diff options
Diffstat (limited to 'higgs.h')
-rwxr-xr-x | higgs.h | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,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();
+};
|