Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void VREMYA(int t){
- if(vremya>0){
- glutTimerFunc(1000,VREMYA,vremya);
- cout<<vremya<<endl;
- vremya-=1;
- }
- else{
- cout<<"gamnover"<<"your score"<<score<<endl;
- }
- }
- void clickplace(int butt, int state, int x, int y){
- double tochx=double (x)/40.0-10.0;
- double tochy=double(y)/-40.0 + 10.0;
- double rx=tochx-xk;
- double ry=tochy-yk;
- double vekt=sqrt(rx*rx+ry*ry);
- if(butt==0&&state==0&&vekt<=sk){
- cout<<"popal"<<endl;
- score+=1;
- sk*=0.9;
- xk=rand()%21-10+(rand()%11)/10;
- yk=rand()%21-10+(rand()%11)/10;
- draw();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement