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

Method structure_garrison

battlecode-engine/src/unit.rs:926–929  ·  view source on GitHub ↗

Returns the units in the structure's garrison. InappropriateUnitType - the unit is not a structure.

(&self)

Source from the content-addressed store, hash-verified

924 ///
925 /// * InappropriateUnitType - the unit is not a structure.
926 pub fn structure_garrison(&self) -> Result<Vec<UnitID>, GameError> {
927 self.ok_if_structure()?;
928 Ok(self.garrison.clone())
929 }
930
931 /// Updates this structure as though a worker has just built it.
932 pub(crate) fn be_built(&mut self, build_health: u32) {

Callers 7

run.pyFile · 0.80
run.pyFile · 0.80
move_to_spaceMethod · 0.80
move_from_spaceMethod · 0.80
destroy_unitMethod · 0.80
ok_if_can_unloadMethod · 0.80
examplefuncsplayerFunction · 0.80

Calls 2

ok_if_structureMethod · 0.80
cloneMethod · 0.80

Tested by

no test coverage detected