Skip to content

Commit d101c15

Browse files
committed
removing plots. redundant with new perimiters array
1 parent 27aa5a2 commit d101c15

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

2024/12/jamestomasinon.v

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mut:
66
area i64
77
perimiter []Perimiter
88
sides []Perimiter
9-
plots [][]int
109
}
1110

1211
struct Perimiter {
@@ -42,7 +41,6 @@ fn check_cell(mut region &Region, mut visited [][]bool, grid []string, row int,
4241
if !visited[new_row][new_col] {
4342
// add to region size
4443
region.area += 1
45-
region.plots << [new_row, new_col]
4644
// mark as visited
4745
visited[new_row][new_col] = true
4846
// recursive directional search
@@ -100,7 +98,6 @@ fn main() {
10098
id: runes[col]
10199
area: 1
102100
}
103-
region.plots << [row, col]
104101
// check for each direction to see if 0) valid 1) unvisited and 2) matching id
105102
check_cell(mut region, mut visited, grid, row, col, max_y, max_x)
106103
regions << region

0 commit comments

Comments
 (0)