You will need to create an object-oriented design diagram for a maze builder program, which will be implemented in your next assignment. A few questions must also be answered about how certain operations will work, in context of the design that has been created.
The design process will involve writing a class hierarchy to store information about the maze area, as well as the rooms within the maze, the items contained within a room, exit points, etc.
The maze system design must also provide a unified “front end” to an (as yet undefined) userinterface portion of the program, through the provision of a “maze engine” façade class that provides a single point of call for all high level maze operations.
The maze scenario will need to be modelled as a number of entities. A description of the main entities involved in the system, and their behaviours, are detailed below.
Very Important Note: the entities described below are not the only ones in the system. You will need to identify and define the others, and how they operate in the game (for example; various data holder and structure classes to facilitate easy data encapsulation and storage).
The Player
When the maze is being traversed, it is being done so by a player. This player has a name, and a health status integer. The player’s health status will be affected by various items present in the maze, as described in further detail below.
The player does not have an “inventory”, nor can they pick up or drop items.
The Maze Space
The maze is defined as a three-dimensional space, inside of which positions are denoted by three grid reference integers (x, y, z).
This maze space is used for two distinct purposes: building a maze, and traversing it. The details of what these two functionalities require are described in further detail below. It is important to note that not all user interfaces that will attach to the maze engine will take advantage of both functionalities; e.g. a game may only require traversability.
Inside this maze space, rooms are defined as being present at a particular coordinate space. Each room has a name, and a number of unidirectional exit points (e.g. if a path leads from room A to room B, that does not automatically imply that there is a path from room B to room A.) Each exit point has a name, and a destination grid reference. The destination grid reference must lead to an existing room.
Exit points do not necessarily “border” the existing room – for example, an exit point named “secret door” or “teleporter” for a room may lead to an area far away in the maze space.
Each space also can store a collection of items, which have a name and a “health” value which would affect a traverser of the maze. Health values may be positive or negative.
In order for a maze to be complete, there must be rooms set as a “start” and a “finish”.
Using the Maze Space: Building
The first major functionality of the maze space is that it should be buildable. That is, there should be functionality that allows the maze to be added to. At a minimum, operations such as those below should be allowed by a user of the maze builder system:
Using the Maze Space: Traversing
The second major functionality of the maze space is that it should be traversable. This means that methods should exist that allow for a player to access one room from another and complete the maze, along with any associated methods to facilitate this. The following functionality is considered a minimum amount for a maze system to be traversable:
Implementing the Maze Space
Attention must be paid towards how the maze space is implemented. This will include, at least, the following considerations to be made:
Design the class structure for each of these sections. This must be documented as a UML class diagram. You should take advantage of object-oriented concepts such as association, composition, inheritance, method overriding, abstract classes, interfaces, visibility and other relevant properties