Simple Game Assignment


Assignment

Create a Python program that enables the user to play a simple game. At the start of the game, a 50 by 50 solid black square should be drawn at a random location on the board and the user's turtle should be visible at coordinate (0, 0). The user should be able to control the turtle by using the four arrow keys. Each arrow key should move the turtle 25 pixels forward in the direction of the arrow. When the turtle enters the 50 by 50 black square, the game is won. When the game is won, a message should be printed on the turtle screen telling the user how many moves it took to win.

Grading

Submission

Place the solution in a file named game.py and e-mail it to Ryan (ryanbockmon@gmail.com) by the deadline. The title of the e-mail should be JBD, Game Assignment, Your Name, Your Partner's Name (if you worked with a partner). In the body of the e-mail, explain briefly the enhancement.

Late submissions will receive no credit, but partial credit can be earned by making an ontime submission.

Sample Student Solutions