优秀的毕业设计论文网
计算机 JAVA 电子信息 单片机 机械机电 模具 土木工程 建筑结构 论文
热门搜索词:网络 ASP.NET 汽车 电气 数控 PLC

VC390 中国象棋系统双人对下游戏设计

以下是资料介绍,如需要完整的请充值下载.
1.无需注册登录,支付后按照提示操作即可获取该资料.
2.资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用.
  
资料介绍:

一. 系统功能说明
本游戏程序为中国象棋双人对下,只要有一方的将(帅)被对方吃掉后系统自动判断输赢,并显示Black is winning the game或(Red is winning the game)。在走棋过程中,系统自动提示红(黑)方走。如果有一方想放弃本局,就可以点击象棋框右边的退出框。如果一局结束后想继续走,则只要用鼠标点击右边的开始框,则进行新一局游戏(具体游戏界面见附录二)。 [资料来源:THINK58.com]

二. 使用说明 本文来自think58

[来源:http://think58.com]

(1)本程序所使用库函数说明
include<stdio.h>    
stdio.h中的基本函数;
include<process.h>  
  process.h中的exit(0)函数;
include<dos.h>    
dos.h中相关鼠标操作设置;
include<math.h>    
math.h中的fabs()函数;
include<conio.h>
include<graphics.h>
    graphics.h中的 setcolor(),setfillstyle(),line(),moveto(),
    floodfill(),circle(),rectange()等函数; copyright think58 [资料来源:www.THINK58.com]

(2)程序使用说明
     鼠标点击棋子一下(棋子外圈变红色),则可以移动当前的棋子;鼠标点击两下(棋子外圈变白色),则取消当前所选的棋子。 本文来自think58 [资料来源:THINK58.com]

三. 程序结构
1. 程序结构说明
见中国象棋流程图(附录一)。
2. 重要数据的说明
见附录二
棋子半径R=17,
棋盘框窗口(60,50,380,410),操作者框窗口(460,40,570,90),
开始框窗口(460,110,570,160),退出框窗口(460,180,570,230),
游戏说明框窗口(460,240,570,410)。
3. 程序函数清单
(1) 自己所编的小型汉字库
void get_hz(int hanzi,unsigned char bur[]);
(2) 显示汉字
void print_hz(unsigned char  *mat,int color,int x,int y);
(3) 画棋子
void drawQizi(struct mouse* mouse1,int color);
(4) 初始化游戏(显示游戏棋盘包括操作、开始、退出、游戏说明框,棋子)
void showQiPan();
(5) 鼠标初始化
void  initmouse();
(6) 初始鼠标位置
void cursttoxy(int x,int y);
(7) 显示开始框
showKSK(int color);
(8) 显示退出框
showTCK(int color);
(9) 显示说明框
showSMK(int color);
(10) 显示操作框
showCZK(int color);
(11) 取消当前鼠标位置

think58

[资料来源:THINK58.com]


void cancelMouse(int x,int y);
(12) 显示鼠标位置
void showMouse(int x,int y);
(13) 读取当前鼠标位置
void readmouse(int* bottom,int* mousex,int* mousey);
(14) 判断各个棋子的步法
int judgestepright(struct mouse* mouse0,
struct mouse* mouse1,int a[10][9]);
(15) 是否退出游戏
int isoutgame(int mousex,int mousey);
(16) 是否存在棋子
int isexistQi(struct mouse *mouse,int a[10][9],int number);
(17) 是否开始游戏
int begingame(int mousex,int mousey);
(18) 判断输赢
int checkwin(int temp);
(19) 是否要取消当前要移动的起子
int iscancelQizi(struct mouse* mouse0,struct mouse* mouse1)
(20) 改变棋子
void changeQizi(struct mouse* mouse0,struct mouse* mouse1);
(21) 改变棋子边框颜色
void changecolor(struct mouse* mouse0);
(22) 游戏界面初始化
void newGame();
(23) 结束游戏
void GameOver();
think58.com [资料来源:http://think58.com]