File indexing completed on 2024-04-21 04:04:08

0001 /*
0002  *   XFrisk - The classic board game for X
0003  *   Copyright (C) 1993-1999 Elan Feingold (elan@aetherworks.com)
0004  *
0005  *   This program is free software; you can redistribute it and/or modify
0006  *   it under the terms of the GNU General Public License as published by
0007  *   the Free Software Foundation; either either version 2
0008    of the License, or (at your option) any later version.of the License, or
0009  *   (at your option) any later version.
0010  *
0011  *   This program is distributed in the hope that it will be useful,
0012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  *   GNU General Public License for more details.
0015  *
0016  *   You should have received a copy of the GNU General Public License
0017  *   along with this program; if not, write to the Free Software
0018  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0019  *   02110-1301, USA
0020  *
0021  *   $Id: aiClient.h,v 1.3 1999/11/13 21:58:30 morphy Exp $
0022  */
0023 
0024 #ifndef _AICLIENT
0025 #define _AICLIENT
0026 
0027 /* Commands sent to the callback */
0028 #define AI_INIT_ONCE        0
0029 #define AI_INIT_GAME        1
0030 #define AI_INIT_TURN        2
0031 #define AI_FORTIFY          3 /* (Number of armies) */
0032 #define AI_PLACE            4
0033 #define AI_ATTACK           5
0034 #define AI_MOVE             6
0035 #define AI_EXCHANGE_CARDS   7
0036 #define AI_SERVER_MESSAGE   8 /* (Text of the message) */
0037 #define AI_MESSAGE          9 /* (Text of the message) */
0038 #define AI_MOVE_MANUAL     10 /* (Number of armies) */
0039 
0040 /* Actions computer players can perform -- PUBLIC INTERFACE */
0041 // int AI_Attack(int iSrcCountry, int iDstCountry, 
0042 //         int iAttackMode, int iDiceMode, int iMoveMode) {return -1;}
0043 // int AI_ExchangeCards(int *piCards) {return -1;}
0044 
0045 /* Attack modes */
0046 #define ATTACK_ONCE      0
0047 #define ATTACK_DOORDIE   1
0048 
0049 /* Dice modes */
0050 #define DICE_MAXIMUM     0
0051 #define DICE_ONE         1
0052 #define DICE_TWO         2
0053 #define DICE_THREE       3
0054 
0055 /* What to do with armies after taking a country.  If you wish to move
0056  * the maximum amount of armies into the country you might occupy with
0057  * the attack, pass ARMIES_MOVE_MAX.  If you want the minimum number
0058  * of armies moved, pass ARMIES_MOVE_MIN.  If you want finer control,
0059  * pass in ARMIES_MOVE_MANUAL, and your callback will be called with
0060  * the command AI_MOVE_MANUAL.
0061  */
0062 
0063 #define ARMIES_MOVE_MAX    0
0064 #define ARMIES_MOVE_MIN    1
0065 #define ARMIES_MOVE_MANUAL 2
0066 
0067 #endif