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

Method can_produce_robot

battlecode-engine/src/world.rs:1862–1864  ·  view source on GitHub ↗

Whether the factory can produce a robot of the given type. The factory must not currently be producing a robot, and the team must have sufficient resources in its resource pool.

(&mut self, factory_id: UnitID, robot_type: UnitType)

Source from the content-addressed store, hash-verified

1860 /// must not currently be producing a robot, and the team must have
1861 /// sufficient resources in its resource pool.
1862 pub fn can_produce_robot(&mut self, factory_id: UnitID, robot_type: UnitType) -> bool {
1863 self.ok_if_can_produce_robot(factory_id, robot_type).is_ok()
1864 }
1865
1866 /// Starts producing the robot of the given type.
1867 ///

Callers 3

run.pyFile · 0.45
run.pyFile · 0.45
examplefuncsplayerFunction · 0.45

Calls 1

Tested by

no test coverage detected