33 lines
930 B
Java
33 lines
930 B
Java
package story;
|
||
|
||
import model.City;
|
||
import model.House;
|
||
|
||
|
||
|
||
public class StoryContext {
|
||
private final City city;
|
||
private final House house;
|
||
private final String storyContext;
|
||
|
||
public StoryContext(City city, House house, String storyContext) {
|
||
this.city = city;
|
||
this.house = house;
|
||
this.storyContext = storyContext;
|
||
}
|
||
|
||
// Getters and setters for city and house
|
||
public City getCity() {
|
||
return this.city;
|
||
}
|
||
|
||
public String getStoryContext() {
|
||
return this.storyContext;
|
||
}
|
||
|
||
public void gatherResidentsForStories() {
|
||
// Implement the logic for gathering residents to listen to stories
|
||
house.gatherResidents();
|
||
System.out.println("Все жители, и малыши и малышки, приходили по вечерам к " + house.getName() + " и слушали рассказы путешественников.");
|
||
}
|
||
} |