minor changes, updated diagram
This commit is contained in:
parent
902b9282df
commit
d634f98d9e
|
@ -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")
|
|
@ -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);
|
||||
|
|
|
@ -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<>();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user