1 /*
2  *   XFrisk - The classic board game for X
3  *   Copyright (C) 1993-1999 Elan Feingold (elan@aetherworks.com)
4  *
5  *   This program is free software; you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation; either version 2 of the License, or
8  *   (at your option) any later version.
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program; if not, write to the Free Software
17  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  *   $Id: game.h,v 1.6 1999/11/13 21:58:31 morphy Exp $
20  */
21 
22 #ifndef _GAME
23 #define _GAME
24 
25 #include "types.h"
26 
27 #define PLACE_ONE       0
28 #define PLACE_MULTIPLE  1
29 #define PLACE_ALL       2
30 
31 
32 
33 void     GAME_PlaceClick(Int32 iCountry, Int32 iPlaceType);
34 void     GAME_PlaceArmies(Int32 iCountry, Int32 iNumArmies);
35 Flag     GAME_ValidPlaceDst(Int32 iPlaceDst);
36 
37 void     GAME_MoveArmies(Int32 iSrcCountry, Int32 iDstCountry,
38 			 Int32 iNumArmies);
39 void     GAME_MoveClick(Int32 iCountry);
40 Flag     GAME_ValidMoveSrc(Int32 iMoveSrc);
41 Flag     GAME_ValidMoveDst(Int32 iMoveSrc, Int32 iMoveDst);
42 
43 void     GAME_DoAttack(Int32 iSrcCountry, Int32 iDstCountry,
44 		       Flag fCacheNotify);
45 void     GAME_Attack(Int32 iSrcCountry, Int32 iDstCountry);
46 void     GAME_AttackClick(Int32 iCountry);
47 Flag     GAME_ValidAttackSrc(Int32 iCountry, Flag fVerbose);
48 Flag     GAME_ValidAttackDst(Int32 iAttackSrc, Int32 iCountry, Flag fVerbose);
49 Flag     GAME_ValidAttackDice(Int32 iAttackDice, Int32 iCountry);
50 Flag     GAME_IsEnemyAdjacent(Int32 iCountry);
51 Flag     GAME_IsFrontierAdjacent(Int32 srcCountry, Int32 destCountry);
52 Int32    GAME_FindEnemyAdjacent(Int32 iCountry);
53 
54 
55 void     GAME_SetTurnArmiesOfPlayer(Int32 iCurrentPlayer);
56 Int32    GAME_GetContinentBonus(Int32 iPlayer);
57 void     GAME_PlayerDied(Int32 iDeadPlayer);
58 void     GAME_GetCard(Int32 iPlayer);
59 void     GAME_ExchangeCards(Int32 *piCards);
60 void     GAME_MissionAccomplied(Int32 iWinner, Int16 iTyp, Int32 iNum1, Int32 iNum2);
61 void     GAME_Victory(Int32 iWinner);
62 void     GAME_GameOverMan(void);
63 void     GAME_EndTurn(void);
64 
65 Flag     GAME_IsMissionAccomplied(Int32 iPlayer, Int32 iKilledPlayer);
66 void     GAME_ShowMission(Int32 iPlayer);
67 Int32    GAME_AttackFrom(void);
68 void     GAME_SetAttackSrc(Int32 src);
69 
70 /* Private routines <sic> */
71 Flag  GAME_CanAttack(Int32 AttackSrc, Int32 iCountry);
72 
73 
74 extern Int32      iLastAttackSrc, iLastAttackDst;
75 extern Int32      iMoveSrc;
76 extern Flag       fGetsCard, fCanExchange;
77 
78 #endif
79