public string CreatePlayer(string playername, string password)
        {
            PreCondition.AssertNotNullOrEmpty(playername, "playername");
            PreCondition.AssertNotNullOrEmpty(password, "password");

            var player = RegisteredPlayers.FirstOrDefault(x => x.PlayerName == playername);
            if (player == null)
            {
                player = new Player(playername, password, Guid.NewGuid().ToString());
                RegisteredPlayers.Add(player);
            }
            return player.Id;
        }
 public ChatLine(Player player, string text)
 {
     Player = player;
     Text = text;
 }
예제 #3
0
 public void AddPlayer(Player player)
 {
     Players.Add(player);
     LastUse = DateTime.Now;
 }