Project for Software Design (XB_40007), Computer Science @ VU Amsterdam, 2019/2020. TextAdventureGame Group 7: Koen van den Burg, Bogdan Cercel, Claudia Grigoras, Sofia Konovalova, Wilkin van Roosmalen.
Modeling. By building on assignment 1, you will model the system via UML models (see the Modeling section in the Team Project guide).
Implementation (base). You implement a minimal subset of the system (e.g., the text adventure game allows only empty rooms and basic movement of the user). In this context, the goal is to show the instructors that you acquired the basics about how to correctly represent your modelled design solution in Java.
The revised version of assignments 1 and 2 will be taken into consideration to see how the instructors’ feedback has been addressed.
Currently the only character in the game is the `Player':
publicclassPlayerimplementsInteractable {
privateStringname;
privateList<String> inventory;
privatePlayerStatsplayerStats;
/* Interactable methods here *//* Getters & Setters here */
}
What needs to change?
More characters should be added to the game besides the player. We need friendly characters the player can talk with and enemies the player can fight with.
How is this implemented?
Abstract Class Character needs to be added. The Character will contain the implementation of the inventory (the list and also the getters and setters). The Character abstract should implement the Interactable interface.
The Player class will extend the Character abstract (thus removing the inventory implementation from the Player code).
A new class Friend (extends Character) needs to be added. Friends should be able to have conversations with the Player. A new class Conversation (extends Interactable) should be added and used as an attribute to Friend. When in a conversation, players can use a limited set of commands. The player is locked in a loop different from the main loop in Game.
A new class Enemy (extends Character) should also be added. Instead of having a conversation with the Player, Enemies can engage in combat.
New class Combat should be added. When in combat, the commands the player can use are limited. The player is locked in a loop different from the main loop in Game. Let's keep Combat a simple game of rock-paper-scissors for now.
Characters should be maintained by the Scene class, as characters can only be in one scene. More info on that later.
TODO
please tick off when you are done and also comment
The Effect object mapped to the specific command string is retrieved and applied.
What exactly happens when an Effect is applied depends on the Effect.Type.
What needs to change?
One command should be able to apply multiple effect types.
How is this implemented?
New class Effects should be added. The Effects should contain a collection of Effect objects. Effects should also contain an apply() method that simply applies all the Effect objects at once.
Instead of mapping the command string to an Effect object, it should be mapped to an Effects object.
TODO
please tick off when you are done and also comment