game.h

来自「基于UP-3000ARM实验箱的触摸屏小游戏-黑白棋。游戏能够在试验箱上顺利运行」· C头文件 代码 · 共 54 行

H
54
字号

#ifndef __GAME_H__
#define __GAME_H__


#include "def.h"
#include "LCD320.h"
#define M 8//the num of ge zi
#define N 25//the num pixcle of each ge zi 
#define STARX 20
#define ENDX  220
#define STARY 90
#define ENDY  290

int GradeWhite;//白子分数
int GradeBlack;//黑子分数
int Infor[M][M];//底色为0,白色为1,黑色为2
int Address[M][M];

void DrowPlant();
void DrowCirle();
void DrowCirle1();
void InitGame();
int  IsEnd();
int Win();
void ShowGrade();
void ShowAdd();
int Stop();
int DrowEnd();
//check and drow pixcle
int UpCheck(const int x,const int y,int color);
int	DownCheck(const int x,const int y,int color);
int	RightCheck(const int x,const int y,int color);
int	LeftCheck(const int x,const int y,int color);
int	RightUpCheck(const int x,const int y,int color);
int	LeftUpCheck(const int x,const int y,int color);
int	RightDownCheck(const int x,const int y,int color);
int	LeftDownCheck(const int x,const int y,int color);
int Put(const int x,const int y,int color);
void ManStep(const int x,const int y);
//chech only 
int Allow(int x,int y,int color);
int AllowUpCheck(const int x,const int y,int color);
int AllowDownCheck(const int x,const int y,int color);
int AllowRightCheck(const int x,const int y,int color);
int AllowLeftCheck(const int x,const int y,int color);
int AllowRigtUpCheck(const int x,const int y,int color);
int AllowLeftUpCheck(const int x,const int y,int color);
int AllowRihtDownCheck(const int x,const int y,int color);
int AllowLeftDownCheck(const int x,const int y,int color);
int AllowPut(int *x,int *y,int color);
void CpuStep();
#endif /*__41000_H___*/

⌨️ 快捷键说明

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