Can request & respond to rematch
This commit is contained in:
@ -300,6 +300,12 @@ impl CurrentGameStatus {
|
||||
BotType::Smart => self.find_smart_bot_fire_location(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Check out whether game is over or not
|
||||
pub fn is_game_over(&self) -> bool {
|
||||
self.opponent_map.sunk_boats.len() == self.rules.boats_list().len()
|
||||
|| self.your_map.sunk_boats.len() == self.rules.boats_list().len()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user