Skip to content

Commit

Permalink
fix: missing comman in player model
Browse files Browse the repository at this point in the history
  • Loading branch information
0xibs committed Feb 7, 2025
1 parent bb3d901 commit 6743274
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions onchain/src/models/player.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Player {
pub is_bot: bool,
pub total_games_played: u256, // Count of total games played by this player
pub total_games_completed: u256, // Count of total games completed by this player
pub total_games_won: u256 // Count of total games won by this player
pub total_games_won: u256,
}


Expand Down Expand Up @@ -40,6 +40,13 @@ pub trait PlayerTrait {

impl PlayerImpl of PlayerTrait {
fn new(username: felt252, owner: ContractAddress, is_bot: bool) -> Player {
Player { username, owner, is_bot, total_games_played: 0, total_games_won: 0 }
Player {
username,
owner,
is_bot,
total_games_played: 0,
total_games_completed: 0,
total_games_won: 0,
}
}
}

0 comments on commit 6743274

Please sign in to comment.