Skip to content

Commit

Permalink
fix trials left. Now decrements when a trial starts
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSammyM committed Dec 9, 2023
1 parent ff30418 commit 12eb385
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/game/on_client_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Game {

if let Some(player_on_trial) = next_player_on_trial {
self.send_packet_to_all(ToClientPacket::PlayerOnTrial { player_index: player_on_trial.index() } );
self.start_phase(PhaseState::Testimony { trials_left, player_on_trial });
self.start_phase(PhaseState::Testimony { trials_left: trials_left-1, player_on_trial });
}
},
ToServerPacket::Judgement { verdict } => {
Expand Down
2 changes: 1 addition & 1 deletion server/src/game/phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl PhaseState {
// TODO send no trials left
Self::Evening { player_on_trial: None }
}else{
Self::Voting { trials_left: trials_left-1 }
Self::Voting { trials_left: trials_left }
}
},
&PhaseState::Evening { player_on_trial } => {
Expand Down

1 comment on commit 12eb385

@vercel
Copy link

@vercel vercel bot commented on 12eb385 Dec 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mafia-game – ./

mafia-game.vercel.app
mafia-game-git-00x-main-itssammym.vercel.app
mafia-game-itssammym.vercel.app

Please sign in to comment.