custom addition -> elementwise addition : Base

This commit is contained in:
Maxime Vorwerk
2023-09-25 06:48:26 +02:00
parent 4179f2bb45
commit ec5069a9fb
3 changed files with 6 additions and 10 deletions

View File

@@ -19,12 +19,12 @@ function getPossibleNeighbors(S::Polycube)
possibleSpots = Set{Tuple{Int64, Int64, Int64}}()
for p S.recentCubes
push!(possibleSpots,
p + (1, 0, 0),
p + (0, 1, 0),
p + (0, 0, 1),
p - (1, 0, 0),
p - (0, 1, 0),
p - (0, 0, 1)
p .+ (1, 0, 0),
p .+ (0, 1, 0),
p .+ (0, 0, 1),
p .- (1, 0, 0),
p .- (0, 1, 0),
p .- (0, 0, 1)
)
end
spots = setdiff(possibleSpots, S.cubes)