Cleaned up compile warnings
authorJustin Worthe <justin@worthe-it.co.za>
Sat, 8 Sep 2018 08:29:59 +0000 (10:29 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sat, 8 Sep 2018 08:29:59 +0000 (10:29 +0200)
src/strategy/monte_carlo.rs
src/strategy/monte_carlo_tree.rs

index a513a63..039c861 100644 (file)
@@ -470,7 +470,7 @@ fn sensible_buildings(player: &Player, open_building_spot: bool) -> ArrayVec<[Bu
     result
 }
 
-#[cfg(all(not(feature = "heuristic-random"), feature = "energy-cutoff")]
+#[cfg(all(not(feature = "heuristic-random"), feature = "energy-cutoff"))]
 fn sensible_buildings(player: &Player, open_building_spot: bool) -> ArrayVec<[BuildingType; NUMBER_OF_BUILDING_TYPES]> {
     let mut result = ArrayVec::new();
     if !open_building_spot {
index 7d688f2..fe59e34 100644 (file)
@@ -2,7 +2,6 @@ use engine::command::*;
 use engine::status::GameStatus;
 use engine::bitwise_engine::{Player, BitwiseGameState};
 use engine::constants::*;
-use engine::geometry::*;
 
 use rand::{Rng, XorShiftRng, SeedableRng};
 use time::{Duration, PreciseTime};
@@ -104,6 +103,7 @@ impl NodeStats {
         self.attempts += 1.;
     }
 
+    #[cfg(feature = "benchmarking")]
     fn count_explored(&self) -> usize {
         1 + self.explored.iter().map(|(_, n)| n.count_explored()).sum::<usize>()
     }