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

Method replicate_cost

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

The cost to replicate the unit. InappropriateUnitType - the unit type is not a worker.

(self)

Source from the content-addressed store, hash-verified

188 ///
189 /// * InappropriateUnitType - the unit type is not a worker.
190 pub fn replicate_cost(self) -> Result<u32, GameError> {
191 match self {
192 UnitType::Worker => Ok(REPLICATE_WORKER_COST),
193 _ => Err(GameError::InappropriateUnitType)?,
194 }
195 }
196
197 /// The value of a unit, as relevant to tiebreakers.
198 pub fn value(self) -> u32 {

Callers 2

ok_if_can_replicateMethod · 0.80
replicateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected