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

Method can_build

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

Whether the worker can build a blueprint with the given ID. The worker and the blueprint must be adjacent to each other. The worker cannot already have performed an action this round.

(&self, worker_id: UnitID, blueprint_id: UnitID)

Source from the content-addressed store, hash-verified

1347 /// and the blueprint must be adjacent to each other. The worker cannot
1348 /// already have performed an action this round.
1349 pub fn can_build(&self, worker_id: UnitID, blueprint_id: UnitID) -> bool {
1350 self.ok_if_can_build(worker_id, blueprint_id).is_ok()
1351 }
1352
1353 /// Builds a given blueprint, increasing its health by the worker's build
1354 /// amount. If raised to maximum health, the blueprint becomes a completed

Callers 3

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

Calls 1

ok_if_can_buildMethod · 0.80

Tested by

no test coverage detected