The solution of every problem is another problem.
— Goethe
Setting off on our path to create a little computer game, today we look into random behaviour. Random events are, of course, very important for games. If everything were entirely predictable, many games would be boring.
So, sit back and watch to see how we get Trick the Turtle to stagger around randomly.
And now do it yourself!
Concepts discussed: if statement, random numbers, Greenfoot API documentation
Pingback: Joy Of Code #6 – Random Behaviour - Compu2Learn
“cannot find symbol- method atWorldEdge()
I don’t understand why it isn’t working for me.
(FYI)The video for Joy of Code #6 stopped near the end before explaining how to turn the turtle randomly to the left.
P.S.
This tutorial series is, in my opinion, awesome.
I like turtles
Jared, use (isAtEdge())
awesome tutorial, this is helping my son better understand 🙂 his gaming program