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

Method get_level

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

Returns the current level of the research branch.

(&self, branch: &Branch)

Source from the content-addressed store, hash-verified

81
82 /// Returns the current level of the research branch.
83 pub fn get_level(&self, branch: &Branch) -> Level {
84 if let Some(level) = self.level.get(branch) {
85 *level
86 } else {
87 unreachable!();
88 }
89 }
90
91 fn get_level_mut(&mut self, branch: &Branch) -> &mut Level {
92 if let Some(level) = self.level.get_mut(branch) {

Callers 4

reset_rounds_leftMethod · 0.80
create_unitMethod · 0.80
ok_if_can_blueprintMethod · 0.80
process_factoriesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected