Exemplo n.º 1
0
        public void RemovePlayerFromTheGame(string connectionId)
        {
            logService.Log($"Tring to remove player with connection id from the server {connectionId}");
            var playerData = PlayerCollection.FindByConnectionId(connectionId);

            if (playerData == null)
            {
                logService.Log($"Wasn't able to find any player with connection id {connectionId}");
                return;
            }

            PlayerCollection.RemovePlayer(playerData.PlayerName);
            CharacterCollection.RemovePlayerCharacters(playerData.PlayerName);
        }