public Contestant(string name, IPDStrategy strategy) { if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name", "name can not be null or empty"); if (strategy == null) throw new NullReferenceException("Strategy not set"); Name = name; Strategy = strategy; LastChoice = null; }
/// <summary> /// Constructor used to establish the prisoner name and the strategy that they are adopting /// </summary> /// <param name="name"></param> /// <param name="strategy"></param> public Prisoner(string name, IPDStrategy strategy) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException("name", "name can not be null or empty"); } if (strategy == null) { throw new NullReferenceException("Strategy not set"); } Name = name; Strategy = strategy; LastChoice = null; }