oandxengine.h

来自「Symbian OS C++ for Mobile Phones v3 Exam」· C头文件 代码 · 共 45 行

H
45
字号
// OandxEngine.h
//
// Copyright (c) 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();
	
private:
	COandXEngine();
	TInt TileState(TInt aX, TInt aY) const;

public:
	// reset
	void Reset();
    TInt SquareStatus(TInt aIndex) const;
    
	// stuff
    TBool TryMakeMove(TInt aIndex, TBool aCrossTurn);
    TInt GameWonBy() const;
    
private:
	/**
		Each tile's value is represented by an integer,
		ETileBlank, ETileNought, or ETileCross.
	 */
    TFixedArray<TInt, KNumberOfTiles> iTileStates;
	};

#endif // OANDXENGINE_H

⌨️ 快捷键说明

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