X-Git-Url: http://git.scottworley.com/slidingtile/blobdiff_plain/0e89d341b7be7fa1861892cbcb216bc188f02e60..f92e9dcac70dc0859e1cf176b84b39c42f677e3e:/sliding_tile_lib.h diff --git a/sliding_tile_lib.h b/sliding_tile_lib.h index 300ecdd..1b56da4 100644 --- a/sliding_tile_lib.h +++ b/sliding_tile_lib.h @@ -22,6 +22,7 @@ struct Board { int distance(const InvertedBoard& invo) const; bool operator==(const Board& o) const; bool operator!=(const Board& o) const; + bool operator<(const Board& o) const; }; std::istream& operator>>(std::istream& is, Board& board); std::ostream& operator<<(std::ostream& os, const Board& board); @@ -29,7 +30,7 @@ std::ostream& operator<<(std::ostream& os, const Board& board); struct Step { Board board; std::shared_ptr prev; - std::vector successors(std::shared_ptr shared_this); + std::vector successors(std::shared_ptr shared_this) const; static signed char adjacent[BOARD_SIZE][5]; }; std::ostream& operator<<(std::ostream& os, const Step& step);