Wyo VB Ch4Proj1 "The Maze Game"

Write a program that allows the user to move a PictureBox object through a maze with the arrow keys on the keyboard. Identify an area as the end of the maze and make sure that the object begins at the designated beginning area. If the user's picture box object touches a boundary of the maze or a wall within the maze, reposition the picture box to the beginning of the maze. If the user successfully navigates the object to the end of the maze, display a message box indicating that he won and then reset his position to the beginning.

The program must include at least one road block consisting of a hidden point placed in a random place (using a Random object and the Next method) on the form. If the object collides with the roadblock, display the message box that indicates that he hit the roadblock and then reset the picture box to the beginning of the maze. You must include a File/Reset menu command that repositions the picture box to the beginning of the maze and that regenerates and different position for the roadblock. You must also Include a File/Exit menu to allow the user to properly exit the game. There must be at least 8 inner walls in your maze to earn an A. You must efficiently use a method named Reset in this program.

Your code must be documented well and easy to read. You may use module-level variables only where absolutely necessary (e.g. roadblock coordinates). You must draw your maze on neatly labelled graph paper BEFORE your begin to write the code.

Preconditions:

  • The user will not attempt to cheat.

Your program must follow standard Windows conventions as well as our school's Visual Basic Coding Standards. Name your project Ch4Proj1.

Staple your printouts in the following order:

  1. VB code
  2. Interface Sketch drawn on graph paper labelled to show the exact placement of each endpoint of each line in the maze. The menu does not have to be drawn.
  3. The screen capture of your actual form window at runtime.