Beispiel #1
0
 public Territory GetTerritory(Location location)
 {
     try
     {
         return(Territories.Single(t => t.Location == location));
     }
     catch (Exception ex)
     {
         throw new TerritoryNotFoundException($"{location} does not exist in the Board", ex);
     }
 }
Beispiel #2
0
 public Territory GetTerritory(int row, int col)
 {
     return(Territories.Single(t => t.Location.Row == row && t.Location.Column == col));
 }