Frog Off
Scratch-The Great Frog Off
Up to 5 frogs start in the middle of a grassy island.
Each frog hops in a random direction until it reaches the cool blue water.
The first frog in the water wins. All frogs stop jumping at this point.
Start your program off with one frog only, add a second frog only after you have tested and know that your frogs jump correctly.
To start a new race, click on a rock in the water. If the race is not over, clicking of the rock will not restart the race. It will restart only after a race is over.
Frogs Jump:
big jump: Jump length is 15 steps
medium jump: Jump length is 10 steps
small Jump: Jump length is 5 steps
keep track of the number of jumps made by the frog
there is an equal chance of each type of frog jump
Frogs Rest:
After a frog jumps, it rests from 1 to 3 seconds.
after a big jump,
there is a 60% chance of resting 3 seconds
30% chance of resting 2 seconds and
10% chance of resting 1 second
after a medium jump,
there is a 30% chance of resting 3 seconds
40% chance of resting 2 seconds and
30% chance of resting 1 second
after a small jump,
there is a 0% chance of resting 3 seconds
20% chance of resting 2 seconds and
80% chance of resting 1 second
Frogs Change Directions
Before each jump frog can change its direction by up to +\ - 45 degrees
if two frogs collide, both frogs wait 3 seconds and have a 50/50 chance of pointing toward the starting location.
Add these Modifications only after your program is complete and working:
keep track of the number of each jump type made by the frog
move your Island to the corner of the screen, frog will bounce off the boundary of the stage
one player bet on a frog winning (first in the water)
keep track of the number of winning frogs the user bets on
keep track of the number of races
two players bet on any frog to win
HINTS:
Keep looking here. I will add hints as required.
How to rest -- BigJump
pick a random number(integer) from 1 to 10
if the random number is less than or equal to 6
rest 3 seconds (60%)
else
if the random number is less than or equal to 9
rest 2 seconds (30%)
else
rest 1 second (10%)
You will need to adjust the numbers for the other two types of jumps
NOTICE: that pick random number is only used once in this section of code!
I am not sure these can be done in Scratch.
#1 one player bet on a frog winning (first in the water) or the closest to the starting location
#2 two players bet on any frog to win or be the closest to the starting location