Respawns the player.
425201
def send_respawn(self):
        
        nick = self.player.nick
        self.send_struct('<B%iH' % len(nick), 0, *map(ord, nick))
336845
public function fire()
	{
		$database = $this->input->getOption('database');

		$this->call('migrate:reset', array('--database' => $database));

		// The refresh command is essentially just a brief aggregate of a few other of
		// the migration commands and just provides a convenient wrapper to execute
		// them in succession. We'll also see if we need to res-eed the database.
		$this->call('migrate', array('--database' => $database));

		if ($this->needsSeeding())
		{
			$this->runSeeder($database);
		}
	}
634787
def gameloop(self):
        
        try:
            while True:
                self.handle_events()
                self.update()
                self.render()
        except KeyboardInterrupt:
            pass
648288
public Optional<Integer> start() {
        LOGGER.info("Starting match with: {}", Arrays.toString(players));
        try(ViewerWriter viewerWriter = createViewerWriter()) {
            listeners.forEach(simulatorListener -> simulatorListener.beforeGameStart(players, gameMap));
            Arrays.stream(players).forEach(p -> {
                GameStartApiResponse startData = getStartData(p.getPlayerIndex());
                p.getBot().onGameStarted(new GameStartedApiResponseImpl(startData));
            });

            for (; ; ) {
                Map<Integer, PlayerStats> playersStats = calculatePlayersStats(gameMap.getTiles());
                Arrays.stream(players)
                        .map(player -> sendGameUpdate(player, playersStats))
                        .map(gameMap::move)
                        .filter(Optional::isPresent)
                        .map(Optional::get)
                        .forEach(this::endPlayer);
                gameMap.tick();
                viewerWriter.write(gameMap);
                listeners.forEach(simulatorListener -> simulatorListener.afterHalfTurn(gameMap.getHalfTurnCounter(), gameMap.getTiles()));

                boolean reachedMaxTurns = gameMap.getHalfTurnCounter() > (configuration.getMaxTurns() * 2);
                Player[] alive = Arrays.stream(this.players).filter(Player::isAlive).toArray(Player[]::new);
                if (alive.length == 1) {
                    Player winner = alive[0];
                    sendGameUpdate(winner, calculatePlayersStats(gameMap.getTiles()));
                    return endGame(winner);
                } else if (reachedMaxTurns) {
                    return disconnectPlayers(this.players);
                }
            }
        }
    }
644435
def spawn(self):
        """"""
        self._process = subprocess.Popen(
            [self.path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        self.addCleanup(self._process_kill)
671893
def restart_minecraft(world_state, agent_host, client_info, message):
    """""""
    if world_state.is_mission_running:
        agent_host.sendCommand("quit")
        time.sleep(10)
    agent_host.killClient(client_info)
    raise MissionTimeoutException(message)
287804
def save(self):
        """"""
        if self.Death:
            self.Alive = False
        super(Animal, self).save()
180920
function(client) {
            if(client.debug >= 1)
                client.log(client.balls[client.leaders[0]] + ' WON THE GAME! Server going for restart');

            client.emitEvent('winner', client.leaders[0]);
        }
69514
public function ingameCoop()
    {
        foreach ($this->owner->players as $player) {
            if ($player->isCooping) {
                return true;
            }
        }
        return false;
    }
516723
private void doStopPlaying()
	{
		if (playerThread!=null)
		{
			playerThread.stopMod();
			getSoundOutputStream().closeAllDevices();
			playerThread = null;
			removeMixer();
		}
	}
72937
def player
      PLAYERS.each do |player|
        player_load(player) || next

        instance = player_class(player).new
        player_on_platform?(instance) || next

        return instance if player_launched?(instance)
      end
      nil
    end
427415
function init(player) {  // {{{2
/**
 * @method constructor
 */

  this.timeout = 10 * 1000;

  this.target = player;

  this.actions = {
    mute: {
      command: 'mute',
      data: 'toggle',
      firstOnly: true,
    },
    stop: {
      command: 'stop',
      data: true,
      firstOnly: true,
    },
    pause: {
      command: 'pause',
      data: true,
      firstOnly: true,
    },
    play: {
      command: 'play',
      data: true,
      firstOnly: true,
    },
    playpause: {
      command: 'playPause',
      data: true,
      firstOnly: true,
    },
    forward: {
      command: 'next',
      data: true,
    },
    back: {
      command: 'previous',
      data: true,
    },
    volumeup: {
      command: 'volume',
      data: 'up'
    },
    volumedown: {
      command: 'volume',
      data: 'down'
    },
  };

  this.actions.rewind = this.actions.back;
}
23453
def play(self):
        """"""
        if self.state == STATE_PAUSED:
            self._player.set_state(Gst.State.PLAYING)
            self.state = STATE_PLAYING
721917
public void killAll() {
        for (int i = 0; i < size(); i++) {
            if (i == 0) {
                players[i].bye();
                players[i].stopRunning();
            } else if (i >= 1) {
                try {
                    players[i].bye();
                    players[i].stopRunning();
                } catch (Exception ex) {
                    players[i].handleError(ex.getMessage());
                }
            }
            pause(500);
        }
        if (hasCoach) {
            try {
                coach.bye();
                coach.stopRunning();
            } catch (Exception ex) {
                coach.handleError(ex.getMessage());
            }
            pause(500);
        }
    }
850973
def reset(self):
		
		self.gametree = self.game
		self.nodenum = 0
		self.index = 0
		self.stack = []
		self.node = self.gametree[self.index]
		self._setChildren()
		self._setFlags()
1348974
function restartGame(players) {
    // Replace the current instance with a new instance
    let newGame = new RockPaperScissors(game, players, winCounter, id);
    proxy.swap(newGame);

    q.delay(RESULTS_DELAY)
      .done(function() {
        deferred.resolve(newGame.handleIt(callbacks));
      });
  }
728502
protected synchronized void firePlayerChangeEvent(PlayerBasicChangeEvent.Status status) {
        PlayerBasicChangeEvent pce = new PlayerBasicChangeEvent(this, status);

        for (PlayerBasicChangeListener pcl : playerListeners) {
            pcl.playerBasicChange(pce);
        }
    }