return !operator==(o);
}
+bool Board::operator<(const Board& o) const {
+ for (int i = 0; i < BOARD_SIZE; i++) {
+ if (board[i] < o.board[i]) {
+ return true;
+ } else if (board[i] > o.board[i]) {
+ return false;
+ }
+ }
+ return false;
+}
+
std::istream& operator>>(std::istream& is, Board& board) {
for (int i = 0; i < BOARD_SIZE; i++) {
if (!is.good()) {
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);