blob: c201955c188178ee6090a05e7cce7f57a00c562a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <vector>
#include <climits>
#define S 5
#define SS 25
int getIndex(int x, int y);
int getX(int i);
int getY(int i);
struct Move {
int ndir;
int p;
int dir;
};
class Board {
public:
int square[SS];
int proton[2*S];
int neutron;
int move_count;
public:
void doMove( Move move );
void undoMove( Move move, int n );
std::vector<Move> generateMoves();
int neutronWin();
int pushPiece( int p, int d, bool e = false );
void print();
Board();
};
|