def begin_turn(self): state.buildings = filter(lambda x: x!=None, state.buildings) self.defend_base() if not state.buildings: raise Exception("YOU LOST") state.buildings.sort(key = lambda x: x.sortkey()) state.printStatus()
def do_status(self, line): state.printStatus()