def start(self): if self.started: raise error.GameAlreadyStarted() self.track.reset() for p in self.players.values(): p.reset() self.timeleft = config.game_duration self.started = True self.looper.start(1.0 / self._rate)
def start(self): if self.started: raise error.GameAlreadyStarted() if not self.players: raise error.ActionForbidden("start a game with no players.") self.track.reset() for p in self.players.values(): p.reset() self.timeleft = config.game_duration self.started = True self.looper.start(1.0 / self._rate)