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