""" The game state. """
-from .loader import loader
-
class GameState(object):
def __init__(self):
"turnips": [],
}
self.harvested = 0
+ self.eaten = 0
+ self.days = 0
@property
def station(self):
def seeds(self):
if 'seeds' in self._state:
return self._state['seeds']
- elif self._state["station"] and 'seeds' in self._state["station"]["config"]:
+ elif (self._state["station"] and
+ 'seeds' in self._state["station"]["config"]):
self._state['seeds'] = self._state["station"]["config"]["seeds"]
return self._state['seeds']
return 0
def seeds(self, value):
self._state['seeds'] = value
- def load_station(self, station):
- self._state["station"] = loader.load_station(station)
+ def set_station(self, station):
+ self._state["station"] = station
+
+ def get_spawn_positions(self):
+ return self._state["station"]["config"]["spawn positions"]