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

2012/12/30

chance method

Beginningatdawn Beginningatdawn

2012/12/30

#
I feel really stupid right now. For the life of me I cannot find nor remember the method for performing an action based a percentage of chance(i.e An object will turn 10% of the time the method is called). Can anyone help me out?
paul10y paul10y

2012/12/30

#
maybe if(Greenfoot.getRandomNumber(100)<10){ } or what do you mean?
You need to login to post a reply.