C语言游戏之五子棋源代码.doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《C语言游戏之五子棋源代码.doc》由会员分享,可在线阅读,更多相关《C语言游戏之五子棋源代码.doc(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、C语言游戏之五子棋源代码#include #include #include #include #include #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b #define SPACE 0x3920 #define BILI 20 #define JZ 4 #define JS 3 #define N 19 int boxNN; int step_x,step_y ; int key ; int flag=1 ; void draw_box()
2、; void draw_cicle(int x,int y,int color); void change(); void judgewho(int x,int y); void judgekey(); int judgeresult(int x,int y); void attentoin(); void attention() char ch ; window(1,1,80,25); textbackground(LIGHTBLUE); textcolor(YELLOW); clrscr(); gotoxy(15,2); printf(游戏操作规则:); gotoxy(15,4); pri
3、ntf(Play Rules:); gotoxy(15,6); printf(1、按左右上下方向键移动棋子); gotoxy(15,8); printf(1. Press Left,Right,Up,Down Key to move Piece); gotoxy(15,10); printf(2、按空格确定落棋子); gotoxy(15,12); printf(2. Press Space to place the Piece); gotoxy(15,14); printf(3、禁止在棋盘外按空格); gotoxy(15,16); printf(3. DO NOT press Space ou
4、tside of the chessboard); gotoxy(15,18); printf(你是否接受上述的游戏规则(Y/N)); gotoxy(15,20); printf(Do you accept the above Playing Rules? Y/N:); while(1) gotoxy(60,20); ch=getche(); if(ch=Y|ch=y) break ; else if(ch=N|ch=n) window(1,1,80,25); textbackground(BLACK); textcolor(LIGHTGRAY); clrscr(); exit(0); got
5、oxy(51,12); printf( ); void draw_box() int x1,x2,y1,y2 ; setbkcolor(LIGHTBLUE); setcolor(YELLOW); gotoxy(7,2); printf(Left, Right, Up, Down KEY to move, Space to put, ESC-quit.); for(x1=1,y1=1,y2=18;x1=18;x1+) line(x1+JZ)*BILI,(y1+JS)*BILI,(x1+JZ)*BILI,(y2+JS)*BILI); for(x1=1,y1=1,x2=18;y1=18;y1+) l
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言 游戏 五子棋 源代码
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内