mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-15 15:10:49 +00:00
rename var move for p2
This commit is contained in:
parent
e541631a35
commit
2814b12750
@ -3,9 +3,9 @@ package main
|
|||||||
import "sync"
|
import "sync"
|
||||||
|
|
||||||
// returns the number of unique nodes (reducing multiple nodes with different directions to one)
|
// returns the number of unique nodes (reducing multiple nodes with different directions to one)
|
||||||
func uniqueNodes(move *mover) int {
|
func uniqueNodes(mover *mover) int {
|
||||||
uniqueCoords := []coords{}
|
uniqueCoords := []coords{}
|
||||||
for _, node := range move.nodes {
|
for _, node := range mover.nodes {
|
||||||
if !coordInCoords(node.coords, uniqueCoords) {
|
if !coordInCoords(node.coords, uniqueCoords) {
|
||||||
uniqueCoords = append(uniqueCoords, node.coords)
|
uniqueCoords = append(uniqueCoords, node.coords)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user