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

Method new

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

Construct an initial research state.

()

Source from the content-addressed store, hash-verified

66impl ResearchInfo {
67 /// Construct an initial research state.
68 pub fn new() -> ResearchInfo {
69 let mut level = FnvHashMap::default();
70 for unit in Branch::all() {
71 level.insert(unit.clone(), 0);
72 }
73
74 ResearchInfo {
75 level: level.clone(),
76 maybe_level: level,
77 queue: vec![],
78 rounds_left: None,
79 }
80 }
81
82 /// Returns the current level of the research branch.
83 pub fn get_level(&self, branch: &Branch) -> Level {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected