cube.h
来自「简单的windows api编程实现的俄罗斯方块 希望对初学visual c的您」· C头文件 代码 · 共 39 行
H
39 行
#include <string>
#include <windows.h>
#include <time.h>
#define WIDTH 10
#define HIGHT 30
#define SPEED 500
//---------------------------------------------------------------------------------
typedef struct pt
{
int x,y;
struct pt *next;
}point;
typedef int count;
//---------------------------------------------------------------------------------
class cube
{
public:
cube(cube &Cube);
cube();
void initCube(bool status[HIGHT + 2][WIDTH + 2]);
void moveToLeft(bool status[HIGHT + 2][WIDTH + 2]);
void moveToRight(bool status[HIGHT + 2][WIDTH + 2]);
bool down(bool status[HIGHT + 2][WIDTH + 2], int &score);
bool drop(bool status[HIGHT + 2][WIDTH + 2], int &score);
void change(bool status[HIGHT + 2][WIDTH + 2]);
bool fixup(bool status[HIGHT + 2][WIDTH + 2], int &score);
void creatCube(bool status[HIGHT + 2][WIDTH + 2]);
bool loss(bool status[HIGHT + 2][WIDTH + 2]);
point* getHead();
point* getNextHead();
~cube();
private:
int shape, nextshape;
int direction;
point *head, *nextHead;
};
//---------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?