public User(string username, string password, string email, int money) { hasher = new UserHash(); Username = username; if (password.Equals("")) { throw new NotAPasswordException(""); } Password = hasher.GetHashed(username, password); Email = email; MoneyBalance = money; Stats = new Statistics(); League = new DefaultLeague(); }
public User(string username, string password, string email) { hasher = new UserHash(); Username = username; if (username.Equals("")) { throw new DomainException("Invalid username - can't be empty"); } if (password.Equals("")) { throw new NotAPasswordException(""); } Password = hasher.GetHashed(username, password); Email = email; Stats = new Statistics(); League = new DefaultLeague(); MoneyBalance = 10000; }