⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 carddeck.h

📁 《OSEK/VDX汽车电子嵌入式软件编程技术》中光盘的资料
💻 H
字号:
/************************************************
*
*	$Copyright    2001 Joseph J. Lemieux  ALL RIGHTS RESERVED. $
*
*	$Filename: C:\OSEKBook\src\CH09\inc\carddeck.h $
*
*	Description: This header file defines the 
*                    public types and interfaces for
*                    use in managing the deck of cards. 
*
************************************************/
#ifndef CARDDECKH
#define CARDDECKH


typedef enum PlayerTypetag{
   DEALER,
   PLAYER
   }PlayerType;
#define ACE_IS_ONE 52
/************************************************
*
*   Function:     DealCard
*
*   Inputs:       None
*
*   Outputs:      Displays next card on LCD
*
*   Returns:      Number of cards left in deck.
*
*   Description:  Pulls next card from deck and
*                 displays it on the LCD. Counts the 
*                 number of cards left in the deck.
*                 If no cards are left, it returns 0
*                 immediately.
*
************************************************/
UINT8 DealCard(PlayerType player,UINT8 position, BOOLEAN up);
/************************************************
*
*   Function:     DisplayCard
*
*   Inputs:       card - card to be displayed
*                 displayBuffer - buffer into which the card that 
*                 is to be displayed is placed.
*
*   Outputs:      Displays a card on the LCD
*
*   Returns:      void
*
*   Description:  Displays the actual card on the LCD.
*                 if BLANK_CARD is passed, then the back
*                 of the card is displayed.
*
************************************************/
void DisplayCard(UINT8 card, char * displayBuffer);
/************************************************
*
*   Function:     GetCardValue
*
*   Inputs:       Card to be evaluated.
*
*   Outputs:      None
*
*   Returns:      Value of the card from 2 to 11.
*
*   Description:  Evaluates the value of the card.
*
************************************************/
UINT8 GetCardValue(UINT8 card);
/************************************************
*
*   Function:     GetRemainingCards
*
*   Inputs:       None
*
*   Outputs:      None
*
*   Returns:      Number of cards remaining in the deck.
*
*   Description:  Determines how many cards remain in the
*                 deck and returns that value.
*
************************************************/
UINT8 GetRemainingCards(void);

#endif

⌨️ 快捷键说明

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