Пример #1
0
 public bool Equals(NimCity2State obj)
 {
     if (ReferenceEquals(null, obj))
     {
         return(false);
     }
     if (ReferenceEquals(this, obj))
     {
         return(true);
     }
     return(obj._city == _city);
 }
Пример #2
0
 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);
     }
 }