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

📄 oandxengine.h

📁 Symbian OS C++ for Mobile Phones v3 Example Code
💻 H
字号:
// OandXEngine.h
//
// Copyright (c) 2000 - 2006 Symbian Ltd.  All rights reserved.

#ifndef OANDXENGINE_H
#define OANDXENGINE_H

#include <s32std.h>

#include "oandxdefs.h"

class COandXEngine : public CBase
/**
	This engine class represents the board,
	a grid of tiles which can be modified by
	the controller.
 */
	{
public:
	static COandXEngine* NewL();
	virtual ~COandXEngine();
	
	// reset
	void Reset();
	
	// game logic
	TTileState TileStatus(TInt aIndex) const;
	TBool TryMakeMove(TInt aIndex, TBool aCrossTurn);
	TTileState GameWonBy() const;
	
	// persistence
	void ExternalizeL(RWriteStream& aStream) const;
	void InternalizeL(RReadStream& aStream);
	
private:
	COandXEngine();
	
	TInt TileState(TInt aX, TInt aY) const;

private:
	/**
		Each tile's value is represented by an integer,
		ETileBlank, ETileNought, or ETileCross.
	 */
	TFixedArray<TTileState, KNumberOfTiles> iTileStates;
	};

#endif // OANDXENGINE_H

⌨️ 快捷键说明

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