diff --git a/onchain/src/models/player.cairo b/onchain/src/models/player.cairo index c08eeba..4b4fe9f 100644 --- a/onchain/src/models/player.cairo +++ b/onchain/src/models/player.cairo @@ -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, } @@ -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, + } } }