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

📄 game.h

📁 俄罗斯方块小游戏的源码 只实现了基本的功能
💻 H
字号:
// Game.h: interface for the CGame class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GAME_H__8D9622DD_65EC_4DF5_BCF1_5CF81FCB5909__INCLUDED_)
#define AFX_GAME_H__8D9622DD_65EC_4DF5_BCF1_5CF81FCB5909__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "SmallBox.h"
#include "GameBox.h"
class CGame  
{
    BOOL m_over;
    int index;
    int m_curx ;
    int m_cury ;
	int curindex;
	
public:
    UINT  score;
    BOOL Disabletag;
    CBox m_gamebox;
    CBox m_shapebox[5][4];
public:
	UINT GetScore();
	int GetCurAry();
	void SetCurAry(int number);
	BOOL GetOver();
	void SetOver(BOOL);
	BOOL IsCanMoveEx(CSmallBox (*psb)[g_GameBgRow],CBox newbox,int curx,int cury);
	void SetIndex(int number);
	int GetIndex();
	void ChangeBox(CSmallBox (*psb)[g_GameBgRow],int curx,int cury);
	BOOL IsCanChange(CSmallBox (*psb)[g_GameBgRow],int x,int y);
	void ReleaseBox(HWND hwnd,CSmallBox (*psb)[g_GameBgRow],int curx,int cury);
	BOOL IsCanRelease(CSmallBox (*psb)[g_GameBgRow],int line);
	void GreateBox(HDC hdc,HICON hicon);
	void DisableBox(HWND hwnd,HDC hdc,CSmallBox (*psb)[g_GameBgRow],int curx,int cury,HICON hicon);
	BOOL IsCanDisable(CSmallBox (*psb)[g_GameBgRow],int,int);
	//BOOL IsCanChange();
	//void OnKeyDown(HWND hwnd, int nVKey, LPARAM lParam);
	BOOL IsCanMOVE(CSmallBox (*psb)[g_GameBgRow],int,int);
	void SetCurY(int);
	void SetCurX(int);
	int GetCurY();
	int GetCurX();
	void DrawBox(HDC hdc,HICON hicon);
	void WriteShape();
	void GamePaint(CSmallBox (*psb)[g_GameBgRow],HDC hdc);
	void InitGame(CSmallBox (*psb)[g_GameBgRow]);
	CGame();
	virtual ~CGame();
};

#endif // !defined(AFX_GAME_H__8D9622DD_65EC_4DF5_BCF1_5CF81FCB5909__INCLUDED_)

⌨️ 快捷键说明

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