fix: handle bot errors
This commit is contained in:
parent
4fd1f00af0
commit
3d01e8fe06
2 changed files with 15 additions and 5 deletions
|
|
@ -331,6 +331,9 @@ impl GameState {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
PlayError => {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// We couldn't find anything wrong with the event so it must be good
|
||||
|
|
@ -479,6 +482,7 @@ impl GameState {
|
|||
TurnStage::RollDice
|
||||
};
|
||||
}
|
||||
PlayError => {}
|
||||
}
|
||||
self.history.push(valid_event.clone());
|
||||
}
|
||||
|
|
@ -620,6 +624,7 @@ pub enum GameEvent {
|
|||
player_id: PlayerId,
|
||||
moves: (CheckerMove, CheckerMove),
|
||||
},
|
||||
PlayError,
|
||||
}
|
||||
|
||||
impl GameEvent {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue