mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-08 13:50:48 +00:00
no need to check outofbounds here
This commit is contained in:
parent
5ed54e672b
commit
965e704d39
@ -29,7 +29,7 @@ func Solve(buf []byte) (int, error) {
|
|||||||
|
|
||||||
all := []coords{a.coords, b.coords}
|
all := []coords{a.coords, b.coords}
|
||||||
for _, coords := range calcAntiNodePos(a.coords, b.coords, graph, all) {
|
for _, coords := range calcAntiNodePos(a.coords, b.coords, graph, all) {
|
||||||
if !graph.isOutOfBounds(coords) && !graph.antinodes.contains(coords) {
|
if !graph.antinodes.contains(coords) {
|
||||||
graph.antinodes.insert(coords)
|
graph.antinodes.insert(coords)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user