X-Git-Url: http://git.scottworley.com/slidingtile/blobdiff_plain/5d2f7c7cebb5423fa9618a28871a81671c380041..f92e9dcac70dc0859e1cf176b84b39c42f677e3e:/sliding_tile_lib.h?ds=sidebyside diff --git a/sliding_tile_lib.h b/sliding_tile_lib.h index 0bd3da3..1b56da4 100644 --- a/sliding_tile_lib.h +++ b/sliding_tile_lib.h @@ -20,6 +20,9 @@ struct Board { InvertedBoard invert() const; int distance(const Board& o) const; 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); @@ -27,9 +30,10 @@ 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); #endif /* _SLIDING_TILE_LIB_H */