Imagine a turtle crawling over a grid of squares. As it steps onto a square it looks to see what color it is. Depending on the answer it changes the square to a new color (possibly the same as the original) and rotates clockwise through 0, 90, 180 or 270 degrees and moves forward to the next square.
Write a program that prompts the user for the number of colors used. It then prompts for the new color and direction change for each. Then it runs the 'turtle' either for a user selected number of steps or until the user interrupts.
As the playing area will be finite, you will need to deal with the case where the turtle steps off the edge. This program is easier to write if you have a mechanism to test either a mouse or the keyboard. Such a test will provide an easy way for the user to interrupt when they see that the results have stabilised.
When testing your program stick with relatively few colors (four is quite a good value) and ensure that at least some turns are through 90 or 270 degrees.
Anyone using my Playpen library will find that it provides all the fundamental facilities needed by this program.
This project develops skills for providing user interfaces and storage of data captured from the keyboard.
There are several ways to extend this program. After using it for a few trials it will become obvious that providing persistent storage of captured data so that it can be rerun is highly desirable. You can also explore the potential for adding state directly to the turtle so that its actions depend not only on the color of the square it is on but also on its current state (which is also potentially changed at each step).