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:
@@ -16,13 +16,13 @@ func Solve(buf []byte) (int, error) {
|
||||
wg := sync.WaitGroup{}
|
||||
sumChan := make(chan bool)
|
||||
|
||||
for i := 0; i < len(graph.data); i++ {
|
||||
for j := 0; j < len(graph.data[i]); j++ {
|
||||
for y := range graph.data {
|
||||
for x := range graph.data[y] {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
current := newPoint(j, i)
|
||||
current := newPoint(x, y)
|
||||
if graph.valueAt(current) == 'A' {
|
||||
if func() bool {
|
||||
for _, n := range neighbours(current) {
|
||||
|
||||
Reference in New Issue
Block a user