c语言五子棋源码.zip
立即下载
资源介绍:
c语言五子棋源码.zip
#include
#define N 20
/* 【自学去】网站收集 http://www.zixue7.com */
/*定义键盘*/
#define up 0x4800
#define down 0x5000
#define left 0x4b00
#define right 0x4d00
#define esc 0x011b
#define enter 0x1c0d
#define A 0x1e61
#define S 0x1f73
#define D 0x2064
#define W 0x1177
#define space 0x3920
#define Y 0x1579
#define n 0x316e
int gamespeed=5000;
int i,j,key;
struct Sor
{
int x;
int y;/*x,y表示当前光标的位置*/
int yes[N][N];/* 0表示无棋子,1表示白色棋子,2表示黑色棋子*/
int kao;/* 1表示白棋准备落子,2表示黑棋落子*/
int ok;/*1表示白棋胜出,2表示黑棋胜出*/
}sor;
char hong64H[]={
/* 以下是 '红' 的 64点阵华文新魏 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1E,0x00,0x00,0x03,0xE0,0x00,
0x00,0x00,0x1C,0x18,0x00,0x1F,0xE0,0x00,
0x00,0x00,0x3C,0x38,0x7F,0xFF,0xE0,0x00,
0x00,0x00,0x78,0x70,0xFF,0xFF,0xE0,0x00,
0x00,0x00,0xFF,0xE0,0xFF,0xFF,0xE0,0x00,
0x00,0x01,0xFF,0xE0,0x7F,0xFF,0x80,0x00,
0x00,0x07,0xFF,0xC0,0x7F,0xFF,0x00,0x00,
0x00,0x1F,0xFF,0x80,0x7F,0xFC,0x00,0x00,
0x00,0x0F,0xFF,0x00,0x7F,0xF8,0x00,0x00,
0x00,0x0F,0xFE,0x00,0x01,0xF8,0x00,0x00,
0x00,0x0F,0xFE,0x00,0x01,0xF8,0x00,0x00,
0x00,0x07,0x1C,0x20,0x01,0xF0,0x00,0x00,
0x00,0x04,0x1F,0xE0,0x01,0xF0,0x00,0x00,
0x00,0x00,0x3F,0xE0,0x01,0xF0,0x00,0x00,
0x00,0x00,0x7F,0xE0,0x01,0xF0,0x00,0x00,
0x00,0x00,0x7F,0xC0,0x01,0xF0,0x00,0x00,
0x00,0x00,0xFF,0x80,0x01,0xF0,0x00,0x00,
0x00,0x01,0xFE,0x00,0x01,0xF0,0x00,0x00,
0x00,0x07,0xF8,0x00,0x01,0xF0,0x00,0x00,
0x00,0x03,0xE0,0x00,0x01,0xF0,0x00,0x00,
0x00,0x03,0xC0,0x60,0x03,0xE0,0x00,0x00,
0x00,0x01,0x80,0xE0,0x03,0xF0,0x00,0x00,
0x00,0x00,0x03,0xE0,0x03,0xFF,0xFE,0x00,
0x00,0x00,0x07,0x80,0x07,0xFF,0xFF,0x80,
0x00,0x00,0x1F,0x00,0x3F,0xFF,0xFF,0x80,
0x00,0x00,0x7E,0x01,0xFF,0xFF,0xFF,0xC0,
0x00,0x00,0xF8,0x0F,0xFF,0xFF,0xFF,0xC0,
0x00,0x03,0xF0,0x7F,0xF0,0x00,0x03,0xC0,
0x00,0x0F,0xE0,0xFE,0x00,0x00,0x00,0x00,
0x00,0x0F,0xC0,0x70,0x00,0x00,0x00,0x00,
0x00,0x0F,0x80,0x40,0x00,0x00,0x00,0x00,
0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char fang64H[]={
/* 以下是 '方' 的 64点阵华文新魏 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,
0x00,0x00,0x00,0x00,0x03,0xFF,0xFC,0x00,
0x00,0x00,0x00,0x00,0x3F,0xFF,0xFE,0x00,
0x00,0x00,0x00,0x01,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0x7F,0xFF,0xF8,0x00,0x1E,0x00,
0x00,0x0F,0xFF,0xFF,0xF8,0x00,0x00,0x00,
0x00,0xFF,0xFF,0x00,0xF8,0x00,0x00,0x00,
0x00,0x7F,0xE0,0x01,0xFC,0x00,0x00,0x00,
0x00,0x7F,0x00,0x01,0xE6,0x00,0x00,0x00,
0x00,0x60,0x00,0x03,0xC3,0x80,0x00,0x00,
0x00,0x00,0x00,0x07,0x81,0xC0,0x00,0x00,
0x00,0x00,0x00,0x07,0x00,0xF0,0x00,0x00,
0x00,0x00,0x00,0x0F,0x00,0xF8,0x00,0x00,
0x00,0x00,0x00,0x1E,0x00,0xFC,0x00,0x00,
0x00,0x00,0x00,0x3C,0x00,0xFC,0x00,0x00,
0x00,0x00,0x00,0x78,0x00,0xF8,0x00,0x00,
0x00,0x00,0x01,0xF0,0x01,0xF0,0x00,0x00,
0x00,0x00,0x03,0xE0,0x01,0xE0,0x00,0x00,
0x00,0x00,0x07,0xC0,0x03,0xE0,0x00,0x00,
0x00,0x00,0x1F,0x80,0x03,0xC0,0x00,0x00,
0x00,0x00,0x7F,0x00,0x07,0xC0,0x00,0x00,
0x00,0x01,0xFF,0x00,0x0F,0x80,0x00,0x00,
0x00,0x07,0xFF,0x00,0x0F,0x80,0x00,0x00,
0x00,0x1F,0xF8,0x00,0x1F,0x00,0x00,0x00,
0x00,0x3F,0xC0,0x10,0x3E,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char huo64H[]={
/* 以下是 '获' 的 64点阵华文新魏 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,
0x00,0x00,0x00,0xF0,0x03,0xC0,0x00,0x00,
0x00,0x00,0x00,0xF0,0x03,0xC0,0x00,0x00,
0x00,0x00,0x00,0xF0,0x03,0x80,0x00,0x00,
0x00,0x00,0x00,0xF0,0x07,0x81,0xC0,0x00,
0x00,0x00,0x00,0xF0,0x07,0xFF,0xC0,0x00,
0x00,0x00,0x00,0xF0,0x0F,0xFF,0xC0,0x00,
0x00,0x00,0x00,0x7F,0xFF,0xFF,0x00,0x00,
0x00,0x00,0x01,0xFF,0xFF,0xE0,0x00,0x00,
0x00,0x00,0x3F,0xFC,0x1F,0x00,0x00,0x00,
0x00,0x00,0x7F,0xF8,0x1C,0x00,0x00,0x00,
0x00,0x00,0x7F,0x38,0x18,0x00,0x00,0x00,
0x00,0x00,0x3C,0x10,0x30,0x00,0x00,0x00,
0x00,0x00,0x10,0x00,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0E,0x00,0x80,0x00,
0x00,0x00,0x00,0x20,0x04,0x00,0xE0,0x00,
0x00,0x00,0x30,0x70,0x04,0x00,0xF0,0x00,
0x00,0x00,0x1F,0xF0,0x04,0x00,0xF8,0x00,
0x00,0x00,0x0F,0xF0,0x0C,0x00,0x78,0x00,
0x00,0x00,0x07,0xE0,0x0C,0x00,0x00,0x00,
0x00,0x00,0x07,0xC0,0x0F,0xF8,0x00,0x00,
0x00,0x00,0x0F,0xC0,0x0F,0xF8,0x00,0x00,
0x00,0x00,0x1F,0xE0,0x1F,0xF8,0x00,0x00,
0x00,0x00,0x1F,0xF0,0xFF,0xF0,0x00,0x00,
0x00,0x00,0x39,0xFF,0xFF