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.
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
Current implementation?
When a command is entered, the
Actions
object handles it inonCommand(Command command, Callback callback)
:The
Effect
object mapped to the specific command string is retrieved and applied. What exactly happens when anEffect
is applied depends on theEffect.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. TheEffects
should contain a collection ofEffect
objects.Effects
should also contain anapply()
method that simply applies all theEffect
objects at once.Instead of mapping the command string to an
Effect
object, it should be mapped to anEffects
object.TODO
please tick off when you are done and also comment
Branch:
Assignment3