fix validations & client_cli
This commit is contained in:
parent
c1e99a5f35
commit
5a36bf42af
|
|
@ -139,6 +139,9 @@ impl App {
|
||||||
// &self.game.state.board,
|
// &self.game.state.board,
|
||||||
// dice,
|
// dice,
|
||||||
// );
|
// );
|
||||||
|
self.game.handle_event(&GameEvent::Roll {
|
||||||
|
player_id: self.game.player_id.unwrap(),
|
||||||
|
});
|
||||||
self.game.handle_event(&GameEvent::RollResult {
|
self.game.handle_event(&GameEvent::RollResult {
|
||||||
player_id: self.game.player_id.unwrap(),
|
player_id: self.game.player_id.unwrap(),
|
||||||
dice,
|
dice,
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ impl GameState {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check the turn stage
|
// Check the turn stage
|
||||||
if self.turn_stage != TurnStage::RollWaiting {
|
if self.turn_stage != TurnStage::RollDice {
|
||||||
error!("bad stage {:?}", self.turn_stage);
|
error!("bad stage {:?}", self.turn_stage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -363,7 +363,7 @@ impl GameState {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check the turn stage
|
// Check the turn stage
|
||||||
if self.turn_stage != TurnStage::RollDice {
|
if self.turn_stage != TurnStage::RollWaiting {
|
||||||
error!("bad stage {:?}", self.turn_stage);
|
error!("bad stage {:?}", self.turn_stage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue