C语言乒乓球游戏源码
}
/* 游戏结束 */
void end() {
cleardevice();
setbkcolor(0);
switch(k) {
case 1:
setcolor(RED);
settextstyle(0,0,3);
outtextxy(200,150,"YOU LOST !!");
itoa(num,strnum,10); /* 将num数字按十进制方式转换为对应的字符串 */
outtextxy(400,220,strnum); /* 输出当前分数 */
sleep(2);
cleardevice();
settextstyle(0,0,4);
outtextxy(180,220,"GAME OVER");
sleep(2);
break;
case 0:
setcolor(RED);
settextstyle(0,0,4);
outtextxy(180,220,"GAME OVER");
sleep(2);
break;
}
}
/* 爆裂效果 */
void bomb(int x,int y) {
int r1,i;
int pointX,pointY,point_color;
setcolor(YELLOW);
for(r1=1;r1<=4;r1++) {
circle(x+16,y+7,r1);
delay(1000);
}
delay(3000);
setcolor(RED);
for(r1=1;r1>=6;r1++) {
circle(x+16,y+7,r1);
delay(1000);
}
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新人文社科C语言乒乓球游戏源码(3)全文阅读和word下载服务。
相关推荐: