Maze Challenge

The maze is a rectangular grid of sixteen deviously configured rooms. Each room is configured with zero to four doors that lead to neighboring rooms to the North, East, South, and West. A room may be occupied by zero or more players. Initially, a player occupies the room in the North-West corner of the maze and his health is 100%. Upon entering a room, a player's health is decremented by the room's deviously chosen penalty (note: penalties may be negative, too). When a player's health reaches zero, he dies and is removed from the maze. (Also, when a player's session times out he is removed from the maze.) Each time a player unsuccessfully attempts to leave a room (for example, by moving North in a room that has no door leading to its Northern neighbor,) his health is again decremented by the room's penalty. (Unfortunately, players must discover where the doors are by trial and error.) One room in the maze contains a treasure. A player conquers the maze if he manages to enter the room containing the treasure without dying. In this case the player's score is his health plus the amount of treasure hidden in the room. The current highest score, together with the name of the player who achieved it, is stored as a maze attribute.

Maze Challenge uses the Service-to-Worker variation of the Model-View-Controller architecture. User commands (go N, W, E, or S) are always submitted to a front controller page. Maze Challenge keeps track of players, scores, and views using a MazeBean. In effect, the MazeBean is the model. Clearly it will need application scope. The front controller determines the current position of the user in the maze, moves the user to a new room in the maze, update's the user's health, then selects a view page that "depicts" the room that the user has entered. Each room is depicted by its own color-coded view page. The page describes the room, gives a list of other players who are currently in the room, and provides a form that allows the user to submit his next command. You may be creative in designing your view pages (VRML? etc.).