projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Display power usage per hour.
[tabakrolletjie.git]
/
tabakrolletjie
/
gamestate.py
diff --git
a/tabakrolletjie/gamestate.py
b/tabakrolletjie/gamestate.py
index 219edfb3f5c87c0a21411c3c1023f04a1c12b2f9..9fe4fc85d3557ea0d991a48e664c3627b0912bf3 100644
(file)
--- a/
tabakrolletjie/gamestate.py
+++ b/
tabakrolletjie/gamestate.py
@@
-29,8
+29,9
@@
class GameState(object):
def seeds(self):
if self._state["seeds"] is None:
if (self._state["station"] and
def seeds(self):
if self._state["seeds"] is None:
if (self._state["station"] and
- "seeds" in self._state["station"]["config"]):
- self._state["seeds"] = self._state["station"]["config"]["seeds"]
+ "seeds" in self._state["station"]["config"]):
+ self._state["seeds"] = (
+ self._state["station"]["config"]["seeds"])
else:
self._state["seeds"] = 0
return self._state["seeds"]
else:
self._state["seeds"] = 0
return self._state["seeds"]
@@
-48,5
+49,6
@@
class GameState(object):
def get_spawn_positions(self):
return self._state["station"]["config"]["spawn positions"]
def get_spawn_positions(self):
return self._state["station"]["config"]["spawn positions"]
- def get_target(self):
+ @property
+ def turnip_target(self):
return self._state["station"]["config"]["turnip target"]
return self._state["station"]["config"]["turnip target"]