This site requires JavaScript, please enable it in your browser!
Greenfoot back
SouLi
SouLi wrote ...

2014/3/23

can someone help. I'm making a program that when the first condition is met me add lives. and when the second condition is met. I deduct that lives and wait.

SouLi SouLi

2014/3/23

#
public void live(){ if(((Arb/4)>=1) && (Con/3)>=1) { live++; Arb=ArbRe-4; Cons=ConCo-3; if(live==7) { Greenfoot.stop(); } } //Over condition else if(Pic==3){ live--; Pic=Pic-3; } if(live==0) { Greenfoot.stop(); } } public int alllive(){ return live; }
You need to login to post a reply.