minor changes, updated diagram

This commit is contained in:
Alexander Karpov 2023-12-12 11:51:00 +03:00
parent 902b9282df
commit d634f98d9e
4 changed files with 3 additions and 24 deletions

View File

@ -134,4 +134,4 @@ Error in storytelling: No stories available to tell.
```
## UML Diagram
![UML Diagram](https://new.akarpov.ru/media/files/sanspie/uJsZS/123.svg "https://new.akarpov.ru/files/MUdUTDBZxAXTuRXuqREt")
![UML Diagram](https://new.akarpov.ru/media/files/sanspie/DmZte/diagram.svg "https://new.akarpov.ru/files/YsvFMeuMCbOpfnOlOlyN")

View File

@ -3,7 +3,7 @@ package characters;
import enums.CharacterType;
import story.StoryContext;
public class Traveler extends Character {
public abstract class Traveler extends Character {
public Traveler(String name) {
super(CharacterType.TRAVELER, name);

View File

@ -14,7 +14,7 @@ public class House extends StoryElement {
private final List<Character> residents;
public House(String name) {
super(name); // Assuming the super class StoryElement's constructor takes a name or description
super(name);
this.name = name;
this.residents = new ArrayList<>();
}

View File

@ -1,21 +0,0 @@
package story;
import java.util.ArrayList;
class Narrative {
private ArrayList<StoryEvent> events;
public Narrative() {
this.events = new ArrayList<>();
}
public void addEvent(StoryEvent event) {
events.add(event);
}
public void unfold() {
for (StoryEvent event : events) {
event.occur();
}
}
}