Maze1 |
Create a project that allows the user to watch a mouse find its way through a maze. Watch this video to learn how to click and download the Maze.zip file linked here and then to use that project as a starting point for this project. Before you write the code, sketch the interface of the maze on graph paper as illustrated by this model. Your program must include a maze with at least 10 horizontal and vertical lines using the DrawLine method. Do not include any diagonal or curved lines. Make your maze design simple enough for small children to follow like this example but be sure that it has at least 10 inner walls (not counting the four outer boundaries). Limit your maze to the default 300 pixel width and height of the form. Try not to design a maze that has "dead zones" where the player can't go like this example. Label the endpoints of each line with x, y coordinates. Label each line with a number (1, 2, 3, etc.) starting with the horizontal lines and then the vertical lines. Also label each pathway with a letter (A, B, C, etc.) in the order that the player will follow the pathways from the start to the end of the maze. Use a picture box with a solid background color or a suitable graphic as the mouse and use another picture box and graphic to indicate the end of the maze (e.g. a piece of cheese). When the user clicks the form, For loops must be used to automatically animate the player through the maze. When the user single-clicks the form, the player's picture box must relocate to the beginning of the maze. When the user right-clicks the mouse, the program must exit. Here is an example of how the program should execute although you can ignore the drop-down menu that is no longer required. You must animate your picture box through the maze using For loops like the following examples. Notice that each example corresponds with one of the directions left, right, up, and down. Each pathway (labelled A, B, C, etc.) will correspond with a For loop. For J = 1 To 5 ' to the right For J = 1 To 5 ' up the screen For J = 1 To 5 ' down the screen Your program must follow the Visual Basic Coding Standards. Review the Program Check Off list. Upload the following files to the specified location. Your first name and last initial should replace "JohnD" in the filenames.
You must turn in your graph paper interface sketch to our class inbox clearly labelled with your full name and class period. Past Projects |