📄 apple.h
字号:
#ifndef __APPLE_H
#define __APPLE_H
/*--------------------the functions list-------------------------*/
/*------------list the function according to the position--------*/
/*------------------where the function is located----------------*/
/*--------------------------------------------------------------*/
/*----------functions about the chessrules------------- */
/*--------------from line 114 to line 381---------------*/
void newgame(); /*start a new game*/
void initboard(); /*redraw the board when a game starts*/
void manchess(int x,int y); /*man :how to put a chess*/
void newchess(int *mx,int *my,int *mbutt);/* function to put a chess*/
void chessrules(int x,int y); /*the general rules about the chess*/
int scan(int r,int c);
int test(void);
void maintest(int *psingle); /*test if there is space to put*/
void eatchess(int initrow,int initcolumn);
void realeat(int irow,int icolumn,int crow,int ccolumn,int direct);
void countscores(void);
void addhead(void); /*add the head to the backstep chain*/
void add(struct backstep *head);
void del(struct backstep *head,int single);
void freememory(struct backstep* head);
/*-------------- functions of the graphy--------------- */
/*----------------from line 385 to line 519-----------*/
void showversion(void);
void drawback();
void drawboard(void),drawbutton(void);
void drawpreboard(struct backstep *p,int single); /*draw a new board when backup*/
void drawchess(float i,float j,int color);
void newbutton(int startx,int starty,int endx,int endy);
void pushbutton(int startx,int starty,int endx,int endy);
void drawsign(int oldsignr,int oldsignc,int newsignr,int newsignc);
void showscores(void);
void showresult(int single);
/*------ functions about the controlmeans and mainmenu---------*/
/*------------from line 523 to line 627------------------- */
void mousecontrol(int *psingle);
void keycontrol(int *psingle,int *psignrow,int *psigncolumn);
int readkeyboard(void);
void mvsmcontrol(void); /*let man vs man */
void mvsccontrol(void); /*let man vs computer*/
void backcontrol(int single);/*back up a step*/
void esccontrol(void); /*quit the game*/
/*-----------------digui functions-----------------*/
/*-------------------from line 630--------------*/
void think(int pcomx,int pcomy,int mind,int *presult);
void computer1(void);
void decidedepth();
void virtualeat(int irow,int icolumn,int crow,int ccolumn,int direct);
void virtualeatchess(int initrow,int initcolumn);
int virtualscan(int r,int c);
void virtualscore(int *presult);
void sortout(int result[],int counters,int *pfinal);
void virtualrules(int x,int y);
void initvirtualboard(int depth);
void initvirtualboardnum(int depth); /*memorize the different boards*/
void sortpossibility(int arrayx[],int arrayy[],int counters);
/*---------------normal computer chess-------------------------*/
void computer2();
void minsortout(int result[],int counters,int *pfinal);
void apple();
struct backstep{int preboard[10][10];
struct backstep *next;};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -