diff --git a/README.md b/README.md index 99cef09..71fc937 100644 --- a/README.md +++ b/README.md @@ -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") \ No newline at end of file +![UML Diagram](https://new.akarpov.ru/media/files/sanspie/DmZte/diagram.svg "https://new.akarpov.ru/files/YsvFMeuMCbOpfnOlOlyN") \ No newline at end of file diff --git a/src/characters/Traveler.java b/src/characters/Traveler.java index 3467e18..7343d5f 100644 --- a/src/characters/Traveler.java +++ b/src/characters/Traveler.java @@ -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); diff --git a/src/model/House.java b/src/model/House.java index 2ac7aa2..435b7a0 100644 --- a/src/model/House.java +++ b/src/model/House.java @@ -14,7 +14,7 @@ public class House extends StoryElement { private final List 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<>(); } diff --git a/src/story/Narrative.java b/src/story/Narrative.java deleted file mode 100644 index d31438e..0000000 --- a/src/story/Narrative.java +++ /dev/null @@ -1,21 +0,0 @@ -package story; - -import java.util.ArrayList; - -class Narrative { - private ArrayList events; - - public Narrative() { - this.events = new ArrayList<>(); - } - - public void addEvent(StoryEvent event) { - events.add(event); - } - - public void unfold() { - for (StoryEvent event : events) { - event.occur(); - } - } -} \ No newline at end of file