This assignment is a logical continuation of the case study presented in the lectures requiring you to develop features on top of an existing application. The code base you will be using is an implementation of the "maze game" discussed in the lectures.

Start by spending some time exploring the structure of the code, understand the roles each class plays within the system. Modify the code by adding some locations and exits as a way of getting familiar with it.

You will be required to implement a variety of user stories using the Boost methodology. The "warm up" and some "sets" have been implemented already and your task is to implement a number of further "sets" using the Boost methodology (no "warm down" is required).

The Boost methodology mandates the use of pair programming and the assignment will be performed in pairs (and pairs will be formed from within a lab group).

Marks will be allocated according to the functionality of your code in addition to the elegance and extensibility of your design and the quality of your documentation.

You are free to take ideas presented in the lectures and integrate it into your existing codebase however you must work within the code base given to you by your lecturer for this assignment.

Each student pair is required to extend the existing code base by implementing the following user stories:

User Stories to Implement

  • Buy/Sell Item (requiring the exchange of money and consideration of weight restrictions for the player)
  • Encounter Hostile NPC
    • a "combat state" is triggered when players are co-located with hostiles
    • the NPC has the first attack (this is simply a message saying that the "NPC attacks you but has missed" rather than an implementation of the entire combat subsystem)
    • the player now has an "attack NPC" command at their disposal
    • attack NPC informs the player that their attack was successful and the NPC is now dead (if the NPC is hostile). If a weapon is being wielded then it should also be displayed. For example You have attacked (name of the hostile) with a dagger (Name of the hostile) is now dead
    • or it informs the player that they cannot attack friendly characters
  • Get / drop item (consideration of weight restrictions for the player)
  • Unlock door (requires getting a key)
  • List Inventory (give a list of all items held by your character)
  • Look around location (describe what you see and where the exits are)
  • Talk to character
  • Flee location
  • Ask character to join/leave party

Patterns to Implement in your code

  • Singleton
  • Command
  • Facade
  • Adapter
  • Chain of Responsibility

Describe your implementation of each pattern in your report by beginning with the name of the pattern and then giving the structure of the pattern in UML, as shown in the text by Gamma et. al.

Briefly state the motivation of the pattern then describe your implementation of the pattern in the MazeGame.

Use class diagrams to compare your final implementation of the pattern with the structure given by Gamma et. al. Finally clearly explain how your implementation improves the code.

Character Reference Manual

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.