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

Method asteroid

battlecode-engine/src/map/mod.rs:530–536  ·  view source on GitHub ↗

Get the asteroid strike at the given round. NullValue - There is no asteroid strike at this round.

(&self, round: Rounds)

Source from the content-addressed store, hash-verified

528 ///
529 /// * NullValue - There is no asteroid strike at this round.
530 pub fn asteroid(&self, round: Rounds) -> Result<&AsteroidStrike, GameError> {
531 if let Some(asteroid) = self.pattern.get(&round) {
532 Ok(asteroid)
533 } else {
534 Err(GameError::NullValue)?
535 }
536 }
537
538 /// Get a map of round numbers to asteroid strikes.
539 pub fn asteroid_map(&self) -> FnvHashMap<Rounds, AsteroidStrike> {

Callers 1

process_asteroidsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected