In this assignment, you are required to design, develop and test a software application that employs a Graphical User Interface (GUI) developed using JavaFX and a graph data structure which is configured from a database.
This assignment must be implemented:
- incrementally according to the phases specified in this documentation.
- according to the design given in these specifications. Make sure your assignment corresponds to the class diagrams and descriptions of the methods and classes given in this document.
Background – The Task In an adventure game, the user normally explores a world encountering treasure, magical creatures, monsters and obstacles to be overcome, often with an ultimate quest to be achieved.
In this assignment you are going to start the development of a simple screen-based adventure game by adding the functionality to build the layout of the world to be explored and providing the user with the ability to move around and explore this world using simple text-based commands entered through a GUI.
In our adventure the world consists of rooms connected to other rooms through doors. Each room will have a unique id (a number stored as a String), a simple description of the room, a description of items in the room and a list of the doors to other rooms.
In our simple adventure, the user can enter the following basic commands to explore the world:
- enter n – which allows the user to enter room n, if there is a door to room n from the current location. If there is no door to room n from the current location, enter n results in an error message followed by the description of the current room which includes the list of the rooms that can be accessed through doors from the current location. When the user enters a new room, the user will be told which room has been entered followed by the brief description of the room.
- search – this provides a more detailed description of the room and any items present in the room.
- describe – repeats the initial description of the room plus the list of doors to adjacent rooms.
- goto n – is a magical teleportation command that can take you to any room in the world from any location (assuming that such a room exists). If no such room exists, an error message is displayed.
Future development could have rooms with monsters you have to fight, treasure you can collect, traps, magical creatures that interact with you in some way, maintenance of the user attributes (inventory, strength …) and additional commands to collect treasure, fight monsters etc., but for this assignment we restrict ourselves to the above list of commands. The initial descriptions of the rooms and their more detailed contents is also very simplistic and limited to description 1 for room 1 etc. This is appropriate for testing the application. In an actual game you would have much more imaginative descriptions for your rooms and their contents.