cardgame.h

来自「《OSEK/VDX汽车电子嵌入式软件编程技术》中光盘的资料」· C头文件 代码 · 共 45 行

H
45
字号
/************************************************
*
*	$Copyright    2001 Joseph J. Lemieux  ALL RIGHTS RESERVED. $
*
*	$Filename: C:\OSEKBook\src\CH09\inc\cardgame.h $
*
*	Description:	
*
************************************************/
#ifndef CARDGAMEH
#define CARDGAMEH

/*
* Define the minimum number of cards in the deck
* that will trigger a new shuffle.
*/
#define GAME_MINIMUM_CARDS 10

/*
* States of the game defined
*/
typedef enum GameStatetag {
   GAME_NORMAL,
   GAME_PLAYER_TURN,
   GAME_DEALER_TURN,
   GAME_SHUFFLING
}GameState;

/*
* Possible transitions that may
* occur when a key is pressed.
*/
typedef enum GameTransitionstag {
   START_SHUFFLING,
   DEAL_PLAYER_CARD,
   END_PLAYER_TURN,
   DEAL_DEALER_CARD,
   NEW_GAME,
   NO_ACTION
   }GameTransitions;

GameState GetGameState(void);

#endif /* CARDGAMEH */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?