C语言编写象棋程序代码
发布时间:2021-06-08
发布时间:2021-06-08
可编辑/*--------------------chess.c----------------------*/
#include "dos.h"
#include "stdio.h"
/*----------------------------------------------------*/
#define RED 7
#define BLACK 14
#define true 1
#define false 0
#define SELECT 0
#define MOVE 1
#define RED_UP 0x1100
#define RED_DOWN 0x1f00
#define RED_LEFT 0x1e00
#define RED_RIGHT 0x2000
#define RED_DO 0x3900
#define RED_UNDO 0x1000
#define BLACK_UP 0x4800
#define BLACK_DOWN 0x5000
#define BLACK_LEFT 0x4b00
#define BLACK_RIGHT 0x4d00
#define BLACK_DO 0x1c00
#define BLACK_UNDO 0x2b00
#define ESCAPE 0x0100
#define RED_JU 1
#define RED_MA 2
#define RED_XIANG 3
#define RED_SHI 4
#define RED_JIANG 5
#define RED_PAO 6
#define RED_BIN 7
#define BLACK_JU 8
#define BLACK_MA 9
#define BLACK_XIANG 10
#define BLACK_SHI 11
#define BLACK_JIANG 12
#define BLACK_PAO 13
#define BLACK_BIN 14
/*----------------------------------------------------*/
int firsttime=1;
int savemode;
.