11, 14, -1, -1, -1,
};
-bool Board::is_valid() {
+bool Board::is_valid() const {
bool seen[BOARD_SIZE];
for (int i = 0; i < BOARD_SIZE; i++) {
seen[i] = false;
return is;
}
-signed char Board::hole() {
+signed char Board::hole() const {
for (int i = 0; i < BOARD_SIZE; i++) {
if (board[i] == 0) {
return i;
struct Board {
signed char board[BOARD_SIZE];
- bool is_valid();
- signed char hole();
+ bool is_valid() const;
+ signed char hole() const;
};
std::istream& operator>>(std::istream& is, Board& board);