Random Numbers.
I am a bit confused of how to code "get a random number between -45 and 45".


1 | double x = Math.random(); |
1 | double x = Math.random() * 90 ; |
1 | int x = ( int )(Math.random() * 90 ); |
1 | int x = ( int )(Math.random() * 91 ) - 45 ; |
1 | int x = ( int )(Math.random() * 90 ); |
1 | int x = ( int )(Math.random() * 91 ) - 45 ; |
1 | int x = Greenfoot.getRandomNumber( 91 )- 45 ; |