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

Method write_team_array

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

Writes the value at the index of this planet's team array. ArrayOutOfBounds - the index of the array is out of bounds. It must be within [0, COMMUNICATION_ARRAY_LENGTH).

(&mut self, index: usize, value: i32)

Source from the content-addressed store, hash-verified

692 /// * ArrayOutOfBounds - the index of the array is out of
693 /// bounds. It must be within [0, COMMUNICATION_ARRAY_LENGTH).
694 pub fn write_team_array(&mut self, index: usize, value: i32) -> Result<(), GameError> {
695 let planet = self.planet();
696 self.my_team_mut().team_arrays.write(planet, index, value)
697 }
698
699 // ************************************************************************
700 // ****************************** ACCESSORS *******************************

Callers 1

applyMethod · 0.45

Calls 3

my_team_mutMethod · 0.80
planetMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected