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

📄 shuffle.cpp

📁 this is the task shuffle program after 123 sec in the symbian
💻 CPP
字号:
/*
 ============================================================================
 Name		: shuffle.cpp
 Author	  : 
 Copyright   : Your copyright notice
 Description : Exe source file
 ============================================================================
 */

//  Include Files  

#include "shuffle.h"
#include <e32base.h>
#include <e32std.h>
#include <e32cons.h>			// Console

//  Constants

//  Global Variables

LOCAL_D CConsoleBase* console; // write all messages to this

//  Local Functions

_LIT(KAce, "Ace");
_LIT(KJack, "Jack");
_LIT(KQueen, "Queen");
_LIT(KKing, "King");
_LIT(KOf, "of");
_LIT(KHearts, "Hearts");
_LIT(KClubs, "Clubs");
_LIT(KDiamonds, "Diamonds");
_LIT(KSpades, "Spades");
// main function
void MainL()
{
CCards* deckOfCards = CCards::NewL();
//PUTTING IT INTO PRACTICE: AN ENGINE FOR A SIMPLE CARD GAME 49
TInt i, card;
for (i=0; i<15; i++)
{
card = deckOfCards.Deal();
TInt suit = card/13;
card%=13;
if (0==card)
console->Write(KAce);
else if (10==card)
console->Write(KJack);
else if (11==card)
console->Write(KQueen);
else if (12==card)
console->Write(KKing);
else
//console->Write(_L("%d"), card+1);
console->Write(KOf);
if (0==suit)
console->Write(KHearts);
else if (1==suit)
console->Write(KClubs);
else if (2==suit)
console->Write(KDiamonds);
else
console->Write(KSpades);
}
delete deckOfCards;
}

⌨️ 快捷键说明

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