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

Method my_units

battlecode-engine/src/controller/mod.rs:313–316  ·  view source on GitHub ↗

All the units on your team. Does not include units in space.

(&self)

Source from the content-addressed store, hash-verified

311 /// All the units on your team.
312 /// Does not include units in space.
313 pub fn my_units(&self) -> Vec<Unit> {
314 let my_team = self.world.team();
315 self.world.units().iter().filter(|u| u.team() == my_team).map(|u| u.clone()).collect()
316 }
317
318 /// All the units within the vision range, by ID.
319 /// Does not include units in space.

Callers 3

run.pyFile · 0.80
run.pyFile · 0.80
examplefuncsplayerFunction · 0.80

Calls 4

cloneMethod · 0.80
teamMethod · 0.45
filterMethod · 0.45
unitsMethod · 0.45

Tested by

no test coverage detected