假如一上来速度太快或者太慢的话可以通过改变fast变量的值#include "graphics.h"
#include "math.h"
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define ESC 0x011b
int x,y,x1,y1,key,t1,t2,keyx,keylong,keymove,over=0,i,tt=0,fast;
int ballx[9]=;
int bally[9]=,ballz[9]=;
float ls;
win()
ballz[i]=1;
setcolor(0);
circle(ballx[i],bally[i],10);
if(y<bally[i])
if(x<ballx[i])
else
else
if(x<ballx[i])
else
}
}
}
fungo()
sleep(1);
t1=t2=1;
while(1)
if(y>480)/*失败*/
else if(x==11&&y==11)/*判定碰到东西*/
else if(x==629&&y==11)
else if(x==11)
else
}
else if(y==11)
else
}
else if(x==629)
else
}
else if(y==449)
else if(x>=(keyx+keylong/4)&&x<(keyx+keylong/2))
else if(x>=(keyx+keylong/2)&&x<(keyx+keylong/4*3))
else
}
}
}
if(over)
break;
key=bioskey(0);
setcolor(0);
rectangle(keyx,460,keyx+keylong,470);
if(key==ESC)
else if(key==LEFT)
keyx-=keymove;
else if(key==RIGHT)
keyx+=keymove;
}
} main()