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

Method add_landings

battlecode-engine/src/rockets.rs:68–76  ·  view source on GitHub ↗
(&mut self, round: Rounds, landings: Vec<RocketLanding>)

Source from the content-addressed store, hash-verified

66 /// Add many rocket landings on this round.
67 #[cfg(test)]
68 pub(crate) fn add_landings(&mut self, round: Rounds, landings: Vec<RocketLanding>) {
69 if !self.landings.contains_key(&round) {
70 self.landings.insert(round, vec![]);
71 }
72
73 self.landings.get_mut(&round)
74 .expect("landing round should exist")
75 .extend(landings);
76 }
77
78 /// Get the rocket landings on this round.
79 pub fn landings_on(&self, round: Rounds) -> Vec<RocketLanding> {

Callers 1

test_rocket_landingsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_rocket_landingsFunction · 0.64