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

📄 maincards.cpp

📁 打牌游戏引擎
💻 CPP
字号:
/*
 * mainCards.cpp
 *
 *  Created on: 2009-4-14
 *      Author: pengphy
 */
#include "cards.cpp"
#include <e32cons.h>

LOCAL_D CConsoleBase* gConsole;

LOCAL_C void MainL()
	{
	CCards* deckOfCards = CCards::NewL(2);
	deckOfCards->shuffle();
	TInt i, card;
	for(i=0;i<6;i++)
		{
		card = deckOfCards->Deal();
		TBuf<20> theCard = deckOfCards->CardName(card);
		gConsole->Printf(theCard);
		}
	delete deckOfCards;
	}

void ConsoleMainL()
	{
	_LIT(KConsoleTitle,"helloWorld!");
	gConsole = Console::NewL(KConsoleTitle,TSize(KConsFullScreen,KConsFullScreen));
	CleanupStack::PushL(gConsole);
	MainL();
	CleanupStack::PopAndDestroy(gConsole);
	}

GLDEF_C TInt E32Main()
	{
	__UHEAP_MARK;
	TInt error = KErrNoMemory;
	CTrapCleanup* cleanupStack = CTrapCleanup::New();
	if(cleanupStack != NULL)
		{
		TRAP(error,ConsoleMainL());
		delete cleanupStack;
		}
	
	_LIT(KProgramError,"Program error!");
	__ASSERT_ALWAYS(!error,User::Panic(KProgramError,error));
	__UHEAP_MARKEND;
	
	return error;
	}

⌨️ 快捷键说明

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