📄 board.h
字号:
#ifndef BOARD_H
#define BOARD_H
/*****************************************************************************
COPYRIGHT All rights reserved Sony Ericsson Mobile Communications AB 2007.
The software is the copyrighted work of Sony Ericsson Mobile Communications AB.
The use of the software is subject to the terms of the end-user license
agreement which accompanies or is included with the software. The software is
provided "as is" and Sony Ericsson specifically disclaim any warranty or
condition whatsoever regarding merchantability or fitness for a specific
purpose, title or non-infringement. No warranty of any kind is made in
relation to the condition, suitability, availability, accuracy, reliability,
merchantability and/or non-infringement of the software provided herein.
*****************************************************************************/
#include "Square.h"
#include <w32std.h>
class CminesBaseView;
/*------------------------------------------------------------------*/
/*------------------------------------------------------------------*/
class Board
{
public:
Board(CminesBaseView* view);
bool IsReady() const;
bool IsAlive() const;
int NumClose(int x,int y) const;
void NewGame() { Init(); }
int NumBombsStillToBeFlagged() const;
void PointerDown(TInt x,TInt y);
void PointerUp(TInt x,TInt y);
void SetAt(int x,int y, CSquare* s);
private:
CSquare* At(int x,int y) const;
void TakeIt(int x, int y);
void FlagIt(int x, int y);
CSquare::userValue ValueAt(TInt x, TInt y) const { return At(x,y)->Value(); }
bool ZeroClose(int x,int y) const { return (NumClose(x,y) == 0); }
void UpdateKnownPositions(int xmiddle, int ymiddle);
void Init();
void ShowBombs();
CminesBaseView* iView;
CSquare* iField[10][10];
int iSeed;
TTime iLasttime;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -