Esempio n. 1
0
 public static Player GetPlayerFromPlayerProfile(PlayerProfile profile, string password)
 {
     return new Player
     {
         id = profile.id,
         username = profile.username,
         password = password,
     };
 }
Esempio n. 2
0
 public void LogoutPlayer_IsSuccessful()
 {
     var player = new PlayerProfile
     {
         id = Guid.NewGuid(),
         username = "******",
     };
     _onlinePlayerList.Add(player);
     _service.LogoutPlayer(player.id);
     Assert.DoesNotContain(player, _onlinePlayerList);
 }
Esempio n. 3
0
        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;
        }