Skip to content

Commit

Permalink
[shapes] shape2opposite uses multisets
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometheus3375 committed Jul 17, 2024
1 parent f3b6945 commit 570fba7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions solve/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ def __sub__(self, other: Shape2D, /) -> Shape2D:
triangle = Shape2D('triangle')
square = Shape2D('square')

shape2opposite = {
circle: {triangle, square},
triangle: {circle, square},
square: {circle, triangle},
}

sphere = Shape3D('sphere', circle, circle)
pyramid = Shape3D('pyramid', triangle, triangle)
cube = Shape3D('cube', square, square)
cone = Shape3D('cone', circle, triangle)
cylinder = Shape3D('cylinder', circle, square)
prism = Shape3D('prism', triangle, square)

shape2opposite = {
circle: prism.terms,
triangle: cylinder.terms,
square: cone.terms,
}

__all__ = (
'Shape2D',
'Shape3D',
Expand Down

0 comments on commit 570fba7

Please sign in to comment.