]> git.scottworley.com Git - slidingtile/blobdiff - sliding_tile_lib.h
Keep a count of live Steps
[slidingtile] / sliding_tile_lib.h
index de2ca1f7fb077295cccb7ae41ee6a5527f4ba2ef..11d9de33b810b8410a06e37fc240b69a8270bc7f 100644 (file)
@@ -30,6 +30,7 @@ std::ostream& operator<<(std::ostream& os, const Board& board);
 
 struct Step {
   Step(Board board, std::shared_ptr<Step> prev);
+  ~Step();
 
   Board board;
   std::shared_ptr<Step> prev;
@@ -39,6 +40,7 @@ struct Step {
   int cost(const InvertedBoard& invgoal) const;
 
   static signed char adjacent[BOARD_SIZE][5];
+  static int count;
 };
 std::ostream& operator<<(std::ostream& os, const Step& step);