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

dkshdws's Comments

Back to dkshdws's profile

Nice! Can I use them in a project for school? Ho would I just have fireworks if someone wins my game?
Your stuff is amazing! do you think you could help me with something for my intro class project? I am creating a game of chance foot race. I have 5 racers numbered 1-5, the player picks the one he wants to win and then the race begins. I do not want to use keyControl (which is how I have it currently working. Her is what I am using: public void begin() { int randomLuckyNumber = Greenfoot.getRandomNumber(5); if(Greenfoot.mouseClicked(this)){ Greenfoot.getRandomNumber(5); if((randomLuckyNumber+1) == luckyNumber){ move(); this being the start button. I want racers 1-5 to move randomly until there is a winner. But this will only give me one random number per click, I just want to click and begin the random numbers 1-5 to continue repeatedly. Any input would be greatly appreciated. Thanks!