1 / 16
文档名称:

C语言课程设计实验报告.pdf

格式:pdf   大小:616KB   页数:16页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

C语言课程设计实验报告.pdf

上传人:diqiuren3210 2022/7/17 文件大小:616 KB

下载得到文件列表

C语言课程设计实验报告.pdf

相关文档

文档介绍

文档介绍:: .

);
void judgekey();
int judgeresult(int x,int y);
void attention()
{
char ch;
window(1,1,80,25);
textbackground(LIGHTBLUE);
textcolor(YELLOW);
clrscr();
gotoxy(15,4);printf("Play Rules:");
gotoxy(15,8);
printf(" Left,Right,Up,Down Key to move Piece");
gotoxy(15,12);
printf(" Space to place the Piece");
gotoxy(15,16);
printf(" NOT press Space outside of the chessboard");
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);
}
gotoxy(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++)
line((x1+JZ)*BILI,(y1+JS)*BILI,(x2+JZ)*BILI,(y1+JS)*BILI);
for(x1=1;x1<=18;x1++)
for(y1=1;y1<=18;y1++)
box[x1][y1]=0;
}void draw_circle(int x,int y,int color)
{
setcolor(color);
setlinestyle(SOLID_LINE,0,1);
x=(x+JZ)*BILI;
y=(y+JS)*BILI;
circle(x,y,8);
}
void draw_slice(int x,int y,int color)
{
x=(x+JZ)*BILI;
y=(y+JS)*BILI;
setcolor(color) ;
setfillstyle(SOLID_FILL,color);
circle(x,y,8);
floodfill(x,y,color);
setcolor(color);
setfillstyle(SOLID_FILL,color);
pieslice(x,y,0,360,8);
setcolor(color);
}
void judgekey()
{
int i;
int j;
switch(key)