Removed bitfield comment
authorJustin Worthe <justin@worthe-it.co.za>
Sat, 21 Jul 2018 16:46:09 +0000 (18:46 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sat, 21 Jul 2018 16:46:09 +0000 (18:46 +0200)
I tried implementing it and it made things slower

src/engine/bitwise_engine.rs
src/engine/geometry.rs

index c7cadf1..9dfd449 100644 (file)
@@ -322,7 +322,7 @@ impl BitwiseGameState {
     }
 
     fn fire_single_players_teslas_without_cleanup(player: &mut Player, player_buildings: &mut PlayerBuildings, opponent: &mut Player, opponent_buildings: &mut PlayerBuildings) {
-        player_buildings.tesla_cooldowns.sort_by(|a, b| b.age.cmp(&a.age));
+        player_buildings.tesla_cooldowns.sort_unstable_by(|a, b| b.age.cmp(&a.age));
         for tesla in player_buildings.tesla_cooldowns.iter_mut().filter(|t| t.active) {
             tesla.age += 1;
             if tesla.cooldown > 0 {
index ee331b7..28df774 100644 (file)
@@ -55,7 +55,6 @@ impl Point {
      */
 
 
-    //TODO: Clean up the left vs right bitfield nonsense here, get rid of some branches
     pub fn to_bitfield(&self) -> (u64, u64) {
         (self.to_left_bitfield(), self.to_right_bitfield())
     }