From 570fba7a90beb8b03b5a88348ccae86c915ff233 Mon Sep 17 00:00:00 2001 From: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Date: Wed, 17 Jul 2024 05:28:25 +0300 Subject: [PATCH] [shapes] shape2opposite uses multisets --- solve/shapes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solve/shapes.py b/solve/shapes.py index 454dfde..7d011d2 100644 --- a/solve/shapes.py +++ b/solve/shapes.py @@ -65,12 +65,6 @@ 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) @@ -78,6 +72,12 @@ def __sub__(self, other: Shape2D, /) -> Shape2D: cylinder = Shape3D('cylinder', circle, square) prism = Shape3D('prism', triangle, square) +shape2opposite = { + circle: prism.terms, + triangle: cylinder.terms, + square: cone.terms, + } + __all__ = ( 'Shape2D', 'Shape3D',