public bool Equals(NimCity2State obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } return(obj._city == _city); }
public NimCity2Game(string[] map) { states = new NimCity2State[map.Length]; for (int i = 0; i < map.Length; i++) { List <int> edges = new List <int>(); foreach (char c in map[i]) { int next = (c == 'h') ? 0 : (c - 'A' + 1); edges.Add(next); } states[i] = new NimCity2State(this, i, edges); } }