aboutsummaryrefslogtreecommitdiff
path: root/higgs.h
diff options
context:
space:
mode:
Diffstat (limited to 'higgs.h')
-rwxr-xr-xhiggs.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/higgs.h b/higgs.h
new file mode 100755
index 0000000..c201955
--- /dev/null
+++ b/higgs.h
@@ -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();
+};