ChessServer.Server.CreateRandomNewUser C# (CSharp) Method

CreateRandomNewUser() public static method

public static CreateRandomNewUser ( ) : User
return Protocol.User
        public static User CreateRandomNewUser()
        {
            User user;
            do
            {
                user = new User { Name = Consts.GUEST_PREFIX + _userNumber++ };

            } while (!Users.TryAdd(user.Name, user));
            LostBeats.TryAdd(user.Name, 0);
            return user;
        }