MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / are_all_units_dead

Method are_all_units_dead

battlecode-engine/src/world.rs:2251–2256  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2249 }
2250
2251 fn are_all_units_dead(&self) -> bool {
2252 return self.get_planet(Planet::Earth).units.is_empty() &&
2253 self.get_planet(Planet::Mars).units.is_empty() &&
2254 self.get_team(Team::Red).units_in_space.is_empty() &&
2255 self.get_team(Team::Blue).units_in_space.is_empty();
2256 }
2257
2258 /// Determines if the game has ended, returning the winning team if so.
2259 pub(crate) fn is_game_over(&self) -> Option<Team> {

Callers 1

end_roundMethod · 0.80

Calls 2

get_planetMethod · 0.80
get_teamMethod · 0.80

Tested by

no test coverage detected