求C语言编写的壁球小游戏的源代码,谢谢。

来源:百度知道 编辑:UC知道 时间:2024/05/24 00:43:08
能在TC或DEV上运行就行,不需要图形美化,最好可以调球的速度和接板的长度。
用C写,不要太复杂的,复制粘贴的不要。就100分,全给了。
分给你了 谢谢,只是板移动比较慢,不好操作。你把回答编辑成空白吧,谢谢。

速度和 接板 长度不能改

所以比较难玩

#include "graphics.h"
#include "stdio.h"
#include "conio.h" /*所需的头文件*/

int on; /*声明具有开关作用的全局变量*/
static int score; /*声明静态的记分器变量*/

/* 定义开始界面函数*/

int open()
{
setviewport(100,100,500,380,1); /*设置图形窗口区域*/
setcolor(4); /*设置作图色*/
rectangle(0,0,399,279); /*以矩形填充所设的图形窗口区域*/
setfillstyle(SOLID_FILL,7); /*设置填充方式*/
floodfill(50,50,4); /*设置填充范围*/
setcolor(8);
settextstyle(0,0,9); /*文本字体设置*/
outtextxy(90,80,"BALL"); /*输出文本内容*/
settextstyle(0,0,1);
outtextxy(110,180,"version 1.0");
outtextxy(110,190,"made by ddt");
setcolor(128);
settextstyle(0,0,1);
outtextxy(120,240,"Press any key to continue......");
}