]> git.scottworley.com Git - slidingtile/blame_incremental - sliding_tile_lib.h
A where's-the-hole function.
[slidingtile] / sliding_tile_lib.h
... / ...
CommitLineData
1#ifndef _SLIDING_TILE_LIB_H
2#define _SLIDING_TILE_LIB_H
3
4#include <istream>
5
6const int BOARD_DIM = 4;
7const int BOARD_SIZE = BOARD_DIM * BOARD_DIM;
8
9struct Board {
10 signed char board[BOARD_SIZE];
11 bool is_valid();
12 signed char hole();
13};
14std::istream& operator>>(std::istream& is, Board& board);
15
16extern signed char adjacent[BOARD_SIZE][5];
17
18#endif /* _SLIDING_TILE_LIB_H */