#include<stdio.h>
#include<graphics.h>
#include<bios.h>
#include<dos.h>
#define VK_LEFT 0x4b00
#define VK_RIGHT 0x4d00
#define VK_DOWN 0x5000
#define VK_UP 0x4800
#define VK_HOME 0x4700
#define VK_END 0x4f00
#define VK_SPACE 0x3920
#define VK_ESC 0x011b
#define VK_ENTER 0x1c0d
int a,b,key,flag;
int h=0; /* ji lu zuo biao wei zhi */
int s=0;
int a1=0;
int b1=0;
int result[20][20]; /* remain the tray of chess*/
/* drow the white chess */
void white(int x,int y)
{
setfillstyle(SOLID_FILL,7);
fillellipse(x,y,8,8);
}
/*drow the black chess */
void black(int x,int y)
{
setfillstyle(SOLID_FILL,RED);
fillellipse(x,y,8,8);
}
/*move the chess*/
void move(key)
{
switch(key) /*move the chess */
{
case VK_UP:
if(b>30)
{
b-=30;
s-=1;
}
break;
case VK_DOWN:
if(b<420)
{
b+=30;
s+=1;
}