mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2026-04-13 12:33:36 +00:00
use x := range and y := range, easier to read.
This commit is contained in:
@@ -15,9 +15,9 @@ func Solve(buf []byte) (int, error) {
|
||||
|
||||
var totalCost int
|
||||
totalAreaVisited := make(map[point]struct{})
|
||||
for i := 0; i < len(graph.data); i++ {
|
||||
for j := 0; j < len(graph.data[i]); j++ {
|
||||
start := newPoint(j, i)
|
||||
for y := range graph.data {
|
||||
for x := range graph.data[y] {
|
||||
start := newPoint(x, y)
|
||||
if graph.isOutOfBounds(start) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user