app/Services/Game/StartGameService.php
/**
     * Updates the players turn position
     *
     * @param int $position
     *
     * @return void
     */
Updates the players turn position
@param int $position

@return void
Updates the players turn position @param int $position @return void
private function updatePosition()
    {
        DB::statement("SET @i:=0");
        DB::update("UPDATE players SET players.position=@i:=@i+1 WHERE players.game_id = ? ORDER BY (players.id = ?) DESC, players.position ASC", [
            $this->game->id,
            $this->currentFirstPlayer->id
        ]);
    }
private function updatePosition ( ) { DB :: statement ( " SET @i:=0 " ) ; DB :: update ( " UPDATE players SET players.position=@i:=@i+1 WHERE players.game_id = ? ORDER BY (players.id = ?) DESC, players.position ASC " , [ $ this -> game -> id , $ this -> currentFirstPlayer -> id ] ) ; }
Updates the players turn position
 @param int $position
Updates the players turn position @param int $position