from .scenes.base import WorldEvent
+NAMES =[
+ "roupert",
+ "roachel",
+ "roeginald",
+ "roichard",
+ "rory",
+ "roalph",
+ "roabia",
+ "roafi",
+ "roaman",
+ "roemus",
+ "roadley",
+ "roanaell",
+ "roashwan",
+ "roashid",
+ "roaphael",
+ "roenfield",
+ "roani",
+ "roaya",
+ "roaza",
+ "robekka",
+ "rogan",
+ "roiana",
+ "roberta",
+ ]
+
+
class World:
""" World and player state. """
def _build_initial_state(self):
state = {}
state["roaches"] = [
- self._build_roach("roachel", smart=True),
- self._build_roach("roeginald", strong=True),
- self._build_roach("roichard", fast=True),
+ #self._build_roach("roachel", smart=True),
+ #self._build_roach("roeginald", strong=True),
+ #self._build_roach("roichard", fast=True),
self._build_roach("roupert"),
]
state["serums"] = [
"roachel", None, "roeginald",
None, None, None,
]
- }
+ },
+ "robot": {"seating": []},
+ "roomba": {"seating": []},
+ "quadcopter": {"seating": []},
}
state["level"] = {
"name": "level1",
def proxy(self):
return WorldDictProxy(self._state)
+ def add_new_roach(self):
+ roach_names = [x['name'] for x in self.roaches]
+ for cand in NAMES:
+ if cand not in roach_names:
+ roach = self._build_roach(cand)
+ self._state['roaches'].append(roach)
+ break
+
def apply_event(self, action, *args, **kw):
if action == "set":
return self._apply_set(*args, **kw)