summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-06-30 13:52:34 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-06-30 13:52:34 +0200
commit8d5f075021d8459766493e115ddf7b5eb4e314a1 (patch)
treeef467ff1ba64a9691fd8a89e702d01aedaafd1fc /src
parent826ab69037e9d680a60b4267201f6d7a33ae39f2 (diff)
Pruned dead functions in the engine
Diffstat (limited to 'src')
-rw-r--r--src/engine/mod.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/engine/mod.rs b/src/engine/mod.rs
index 8078ca9..588724a 100644
--- a/src/engine/mod.rs
+++ b/src/engine/mod.rs
@@ -331,10 +331,6 @@ impl GameState {
};
}
- pub fn unoccupied_player_cells_in_row(&self, y: u8) -> Vec<Point> {
- self.unoccupied_player_cells.iter().filter(|p| p.y == y).cloned().collect()
- }
-
fn unoccupied_cells(buildings: &[Building], unconstructed_buildings: &[UnconstructedBuilding], bl: Point, tr: Point) -> Vec<Point> {
let mut result = Vec::with_capacity((tr.y-bl.y) as usize * (tr.x-bl.x) as usize);
for y in bl.y..tr.y {
@@ -348,18 +344,6 @@ impl GameState {
result
}
-
- pub fn occupied_player_cells(&self) -> Vec<Point> {
- self.player_unconstructed_buildings.iter().map(|b| b.pos)
- .chain(self.player_buildings.iter().map(|b| b.pos))
- .collect()
- }
- pub fn occupied_opponent_cells(&self) -> Vec<Point> {
- self.opponent_unconstructed_buildings.iter().map(|b| b.pos)
- .chain(self.opponent_buildings.iter().map(|b| b.pos))
- .collect()
- }
-
pub fn count_player_teslas(&self) -> usize {
self.player_unconstructed_buildings.iter().filter(|b| b.weapon_damage == 20).count() +
self.player_buildings.iter().filter(|b| b.weapon_damage == 20).count()