public PlayerRange Clone() { var cloned = new PlayerRange(); for (int i = 0; i < 13; i++) { for (int j = 0; j < 13; j++) { cloned.Grids[i, j].Grid = this.Grids[i, j].Grid.Clone(); cloned.Grids[i, j].PlayerRangeGridStatus = this.Grids[i, j].PlayerRangeGridStatus.Clone(); } } return(cloned); }
public PlayerRange Intersect(PlayerRange other) { var newRange = this.Clone(); for (int i = 0; i < 13; i++) { for (int j = 0; j < 13; j++) { var grid1 = Grids[i, j]; var grid2 = other.Grids[i, j]; newRange.Grids[i, j] = grid1.Intersect(grid2); } } return(newRange); }