From 671244fc96a54dff2d3bec618ec9e398f744e430 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Sun, 9 Nov 2014 01:07:08 +0100 Subject: Improve judge, add NiAh player from AP. --- morpion_rec/NiAh/main.c | 243 ++++++++++++++++++++++++++++++++++++++++++++++++ morpion_rec/NiAh/main.h | 13 +++ 2 files changed, 256 insertions(+) create mode 100644 morpion_rec/NiAh/main.c create mode 100644 morpion_rec/NiAh/main.h (limited to 'morpion_rec/NiAh') diff --git a/morpion_rec/NiAh/main.c b/morpion_rec/NiAh/main.c new file mode 100644 index 0000000..74248c3 --- /dev/null +++ b/morpion_rec/NiAh/main.c @@ -0,0 +1,243 @@ +/* IA pour morpion récursif - Alexis + * main.c + * Contient les fonctions principales */ + +#include +#include +#include +#include "main.h" + +#define INPUT_LENGTH 50 + +int main() +{ + int i,j,k,l; + + char input[INPUT_LENGTH]; + float timeout; + + Dots grid[9][9]; + Boxes subgrid, move, firstsubgrid; + int firstMove=1; + + for(i=0;i<9;i++) + for(j=0;j<9;j++) + grid[i][j] = FREE; + + subgrid = Z; + firstsubgrid=V; + + // Dis bonjour à Alex ... + fgets(input, sizeof(input), stdin); + for(i=0;i