4
* Copyright (C) 2005, 2008 Frederic Mazzarol
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, see <http://www.gnu.org/licenses/>.
20
#include "gcompris/gcompris.h"
27
#define NBHOLE 12 // Nombre de cases de l'awele
28
#define NBTOTALBEAN 48 // Nombre de graines totale de l'awale
29
#define NBPLAYER 2 // Nombre de joueur
30
#define HUMAN 0 // Numero du joueur Humain (camp Sud)
31
#define COMPUTER 1 // Numero du joueur virtuel (camp nord)
32
#define START_HUMAN 0 // Premiere case du camp Sud
33
#define START_COMPUTER 6 // Premiere Case du camp Nord
34
#define END_HUMAN 5 // Derniere case du camp Sud
35
#define END_COMPUTER 11 // Derniere case du camp Nord
36
#define NBBEANSPERHOLE 4 // Nbre de graine par case en debut de partie
37
#define HALF_SIZE 6 // nbre de case dans un camp
38
#define DEF_DEPTH 3 // Profondeur de recherche de l'algo minimax
39
#define INFINI 50 // Infini pour alphaBeta
42
* Code erreur retour des fonctions de test mouvements
47
#define NOT_GAMEOVER 54
49
#define MSG_FAMINE "declenche une famine"
50
#define MSG_AREA "clic dans ton camp"
51
#define MSG_EMPTYHOLE "Cette case est vide, selectionne une autre case"
55
* Definition nouveaux types de variables
58
short int board[NBHOLE];
59
short int CapturedBeans[NBPLAYER];
69
* Fonction de manipulation de l'awale
71
gboolean diedOfHunger(AWALE *aw);
72
AWALE *moveAwale(short int hole, AWALE * aw);
73
short int think(AWALE * a, short int level);
74
short int randplay(AWALE * a);
76
short int switch_player(short int player);
78
short int threatenDelta(AWALE * aw);
79
short int moveDelta(AWALE * aw);
80
gint eval(GNode *node);