no need to check outofbounds here

This commit is contained in:
onyx-and-iris 2024-12-08 21:46:44 +00:00
parent 5ed54e672b
commit 965e704d39

View File

@ -29,7 +29,7 @@ func Solve(buf []byte) (int, error) {
all := []coords{a.coords, b.coords}
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)
}
}