aboutsummaryrefslogtreecommitdiff
path: root/morpion_rec/NiAh/main.h
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-11-09 22:19:57 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-11-09 22:19:57 +0100
commitb3ace3075f22c50c99e2f1c3004fac2bbfee2989 (patch)
tree33d98c8308750a5506264a7ece8c15ed62e1eb90 /morpion_rec/NiAh/main.h
parent67332d5f6542601fede361af23647bf3afaf19ee (diff)
downloadCompetIA-b3ace3075f22c50c99e2f1c3004fac2bbfee2989.tar.gz
CompetIA-b3ace3075f22c50c99e2f1c3004fac2bbfee2989.zip
Update C template IA for morpion_rec from Alexis.
Diffstat (limited to 'morpion_rec/NiAh/main.h')
-rw-r--r--morpion_rec/NiAh/main.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/morpion_rec/NiAh/main.h b/morpion_rec/NiAh/main.h
index 5cf06d2..5942256 100644
--- a/morpion_rec/NiAh/main.h
+++ b/morpion_rec/NiAh/main.h
@@ -2,12 +2,17 @@
* main.h
* Définition des énumérations, typedef et autres */
+#ifndef MAIN_H
+#define MAIN_H
+
typedef enum {FREE, CROSS, CIRCLE} Dots;
typedef enum {I=0, II=1, III=2, IV = 3, V=4, VI=5, VII=6, VIII=7, IX=8, Z=-1} Boxes;
typedef Boxes Solutions[4][2];
-int play(Dots grid[9][9], Boxes subgrid, Dots player, Boxes move);
-int chooseMoveAndPlay(Dots grid[9][9], Boxes subgrid, Dots player, Boxes *move, Boxes firstSubgrid);
+int play(Dots grid[9][9], Boxes subgrid, Boxes move, Dots player);
+void printGrid(Dots grid[9][9], Dots swon[9]);
void checkSolutions(Boxes a, Solutions sols);
-void printGrid(Dots grid[9][9]);
+void updateWon(Dots grid[9][9], Dots *won, Dots swon[9], Boxes subgrid, Boxes move);
+
+#endif