📄 rsgame.h
字号:
// RsGame.h: interface for the RsGame class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_RSGAME_H__201F1F0F_523F_11DC_9DB7_A0341EE0770D__INCLUDED_)
#define AFX_RSGAME_H__201F1F0F_523F_11DC_9DB7_A0341EE0770D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Game.h"
class RsGame
{
public:
unsigned int nLine;
unsigned int Score;
bool isStop;//暂停1
bool isStart;//开始1
point CurrentCub[4];
bool GameGrid[nGridY][nGridX];//游戏界面,有方格为true
int RotScale;//顺时针旋转角度,0为90度,1为180度
int CubNum;//下一个落下方块类型
RsGame();
virtual ~RsGame();
void GameStart();
bool QuickDn();
void Rot();
void MoveRt();
void MoveLt();
void NewCub();//产生一个新方块
bool isOver();//判断游戏是否结束
bool isBottom();//判断方块是否到底
int CanGainScore();//当前能不能消去若干行得分,如果可以返回消去的行数
private:
int CurrentCubNum;//当前落下方块类型
int PutScore(int n);//根据消去的行数打分
void refreshGameGrid(int y);
};
#endif // !defined(AFX_RSGAME_H__201F1F0F_523F_11DC_9DB7_A0341EE0770D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -