Construct a planet with the given map, where the current karbonite deposits are initialized with the map's initial deposits.
(map: &PlanetMap)
| 97 | /// Construct a planet with the given map, where the current karbonite |
| 98 | /// deposits are initialized with the map's initial deposits. |
| 99 | pub fn new(map: &PlanetMap) -> PlanetInfo { |
| 100 | PlanetInfo { |
| 101 | visible_locs: vec![vec![true; map.width]; map.height], |
| 102 | units: FnvHashMap::default(), |
| 103 | units_by_loc: FnvHashMap::default(), |
| 104 | karbonite: map.initial_karbonite.clone(), |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /// Persistent info specific to a single team. Teams are only able to access |
nothing calls this directly
no test coverage detected