MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / next_in_queue

Method next_in_queue

battlecode-engine/src/research.rs:130–136  ·  view source on GitHub ↗

Returns the next branch to be researched, which is the branch at the front of the research queue. NullValue - There is no branch to be researched.

(&self)

Source from the content-addressed store, hash-verified

128 ///
129 /// * NullValue - There is no branch to be researched.
130 pub fn next_in_queue(&self) -> Result<Branch, GameError> {
131 if let Some(branch) = self.queue.get(0) {
132 Ok(branch.clone())
133 } else {
134 Err(GameError::NullValue)?
135 }
136 }
137
138 /// Returns the number of rounds left until the upgrade at the front of the
139 /// research queue is applied.

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected