Exemple #1
0
 public static Player GetPlayerFromPlayerProfile(PlayerProfile profile, string password)
 {
     return new Player
     {
         id = profile.id,
         username = profile.username,
         password = password,
     };
 }
 public void LogoutPlayer_IsSuccessful()
 {
     var player = new PlayerProfile
     {
         id = Guid.NewGuid(),
         username = "******",
     };
     _onlinePlayerList.Add(player);
     _service.LogoutPlayer(player.id);
     Assert.DoesNotContain(player, _onlinePlayerList);
 }
        public PlayerProfile LoginGuest()
        {
            var guest = new PlayerProfile
            {
                id = Guid.NewGuid(),
                username = "******",
            };

            if (!_onlinePlayers.Contains(guest))
            {
                _onlinePlayers.Add(guest);
            }

            _dataController.CreatePlayer(guest.id, guest.username, "");

            return guest;
        }