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

Method add_landing

battlecode-engine/src/rockets.rs:56–64  ·  view source on GitHub ↗

Add a rocket landing on this round.

(&mut self, round: Rounds, landing: RocketLanding)

Source from the content-addressed store, hash-verified

54
55 /// Add a rocket landing on this round.
56 pub(crate) fn add_landing(&mut self, round: Rounds, landing: RocketLanding) {
57 if !self.landings.contains_key(&round) {
58 self.landings.insert(round, vec![]);
59 }
60
61 self.landings.get_mut(&round)
62 .expect("landing round should exist")
63 .push(landing);
64 }
65
66 /// Add many rocket landings on this round.
67 #[cfg(test)]

Callers 2

test_rocket_landingsFunction · 0.80
launch_rocketMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_rocket_landingsFunction · 0.64