1 /***************************************************************************
2 * Copyright (C) 2008 by NalaGinrut *
3 * suimualatsuki@163.com *
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. *
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. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
25 \brief ¹ØÓÚÿ¾ÖÓÎÏ·µÄËùÓÐÊý¾Ý½á¹¹
36 //----------------------------------------------------------------------------------
39 \brief (ÐÐΪ½Ó¿Ú)ÓÎÏ·¹ý³Ì
41 //----------------------------------------------------------------------------------
42 typedef struct GameProcess
45 \n º¯ÊýÖ¸Õ룬ָÏòGameBid()*/
49 \n º¯ÊýÖ¸Õ룬ָÏòGamePlay()*/
52 /*!ˢбÈÈüÊý¾Ý£¬Ã¿ÂÖplayÖ®ºóÐèÒªrefreshÒ»´Î
53 \n º¯ÊýÖ¸Õ룬ָÏòGameRefresh()*/
54 int (*refresh
) (void);
56 /*!ÅжϹý³ÌÊÇ·ñ½áÊø£¬°üÀ¨ÓÎÏ·¹ý³Ì ºÍ ½ÐÅƹý³Ì
57 \n º¯ÊýÖ¸Õ룬ָÏòNoEnd()*/
60 /*!¼ÓÈëplayerÖ¸ÏòµÄÍæ¼Ò£¬Èç¹ûÒÑÂú£¬Ôò·µ»Ø´íÎó
61 \n º¯ÊýÖ¸Õ룬ָÏòGameJoin()*/
62 int (*join
)(void *,void *);
64 /*!¼ì²éÓÎÏ·ÖÐÊÇ·ñÓпÕȱÍæ¼Ò£¬Óоͷµ»ØFALSE£¬·ñÔò·µ»ØTRUE
65 \n º¯ÊýÖ¸Õ룬ָÏòGameIsFull()*/
70 //----------------------------------------------------------------------------------
72 \brief Ä£ÄâÀ࣬һ¾ÖÓÎÏ·µÄÀàÐÍ
74 //------------------------------------------------------------------------------------
75 typedef struct GameClass
79 /*!Íê½áͶƱ£¬ÈôËùÓÐplayer¶¼Í¶Æ±Íê½á£¬Ôò´Ë´Î»î¶¯½áÊø*/
82 PlayerList bid_order
[4];
83 /*!½ÐÅÆÁбí,δ±ØÓõõ½,Ä¿Ç°¿¼ÂÇÓÃÒ»¸öµ±Ç°Íæ¼ÒflagÀ´½øÐÐclock wiseµÄÑ»·*/
84 PlayerList bid_list
[4];
85 /*!³öÅÆ´ÎÐò,δ±ØÓõõ½,Ä¿Ç°¿¼ÂÇÓÃÒ»¸öµ±Ç°Íæ¼ÒflagÀ´½øÐÐclock wiseµÄÑ»·*/
92 struct Player
*current
;
95 struct GameProcess run
;
101 \brief ½«GameÖеĹ«ÓÃÊý¾Ý¿½±´µ½GlobleDataÖУ¬·½±ãºó¼Ìµ÷ÓÃ
103 typedef struct GlobalData
107 /*!Íê½áͶƱ£¬ÈôËùÓÐplayer¶¼Í¶Æ±Íê½á£¬Ôò´Ë´Î»î¶¯½áÊø*/
110 PlayerList bid_order
[4];
112 PlayerList bid_list
[4];
121 /*!µ±Ç°¸Ã³öÅƵÄÍæ¼Ò*/
122 struct Player
*current
;
129 void GameClass(game
*);
131 //Process½Ó¿ÚµÄº¯ÊýÉùÃ÷£»
135 int GameJoin(game
*,player
*);
140 #endif // END OF GAME_H;