Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing infinite number of rounds #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/systems/game_system.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ mod game_system {
let gameEvent = GameEvent { id: game_id, score: game.score, round: game.round };
emit!(world, (gameEvent));
} else {
game.round = 1;
let GameOverEvent = GameOver {
game_id: game_id, player_address: get_caller_address()
};
Expand Down Expand Up @@ -183,7 +184,7 @@ mod game_system {
let mut leader_board: LeaderBoard = store.get_leader_board(1);

game.state = false;

let new_player: LeaderBoardPlayers = LeaderBoardPlayersTrait::new(
leader_board.len_players, game.player_name, game.score
);
Expand Down