just realized there are no lists, only arrays :(

This commit is contained in:
Maxime Vorwerk
2023-08-25 16:18:57 +02:00
parent 82afad9d57
commit b9ccf5254e
4 changed files with 42 additions and 37 deletions

View File

@@ -1,8 +1,18 @@
struct ImmutableOrientedShape
cubes::List{Tuple{Int8, Int8, Int8}}
cubes::Vector{Tuple{Int8, Int8, Int8}}
hash::UInt
end
Base.hash(S::ImmutableOrientedShape) = S.hash
Base.hash(S::ImmutableOrientedShape, h::UInt) = S.hash h
function Base.==(X::ImmutableOrientedShape, Y::ImmutableOrientedShape)
if hash != hash
return false
elseif X.cubes == Y.cubes
return false
else
return true
end
end