void OnMsg_PlayerIdAssignement(NetMessagePlayerIdAssignment message, INetworkInterfaceConnection source)
    {
        Log.Info("[PlayerRepertoireClient] OnMsg_PlayerIdAssignement");
        _localPlayerInfo.PlayerId = message.playerId;

        _localPlayerIdAssigned = true;
    }
    void OnClientHello(NetMessageClientHello message, INetworkInterfaceConnection clientConnection)
    {
        Log.Info("[PlayerRepertoireServer] OnClientHello");
        int index = _newConnectionsNotYetPlayers.IndexOf(clientConnection);

        if (index == -1)
        {
            Log.Warning("[PlayerRepertoireServer] We received a client hello, but the client is not in the _newConnectionsNotYetPlayers list. The hello will be ignored.");
            return;
        }

        _newConnectionsNotYetPlayers.RemoveAt(index);


        // Add new player to list
        PlayerInfo newPlayerInfo = CreateNewPlayer(message.playerName, false);

        // Notify other players
        NetMessagePlayerJoined playerJoinedMessage = new NetMessagePlayerJoined
        {
            playerInfo = newPlayerInfo
        };

        _serverSession.SendNetMessage(playerJoinedMessage, _playerConnections);
        Log.Info("[PlayerRepertoireServer] sent NetMessagePlayerJoined");

        // add new connection
        _playerConnections.Add(clientConnection);

        // Assign id to the new player
        NetMessagePlayerIdAssignment playerIdAssignementMessage = new NetMessagePlayerIdAssignment
        {
            playerId = newPlayerInfo.PlayerId
        };

        _serverSession.SendNetMessage(playerIdAssignementMessage, clientConnection);
        Log.Info("[PlayerRepertoireServer] sent NetMessagePlayerIdAssignment");


        // Send the complete player list to the new player
        NetMessagePlayerRepertoireSync syncMessage = new NetMessagePlayerRepertoireSync()
        {
            players = _players.ToArray()
        };

        _serverSession.SendNetMessage(syncMessage, clientConnection);
        Log.Info("[PlayerRepertoireServer] sent NetMessagePlayerRepertoireSync");
    }