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

2014/6/3

Press a button on the keyboard then generate a random number and display it on screen?

D.Harwood D.Harwood

2014/6/3

#
This is the code I have now, I'm terrible at Greenfoot so don't blame me.
public class Display extends Actor
{
    public void act() 
    {
        if (Greenfoot.isKeyDown("Space"))
        then
       (Greenfoot.getRandomNumber(90));
    }    
}
I want this to work, it's 90 because that's the maximum number I need to be generated. All help is good help. Thank You.
richyho[ richyho[

2014/6/3

#
No
D.Harwood D.Harwood

2014/6/3

#
https://www.uwotm8.net
You need to login to post a reply.