ready???
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is ahead of 'dw/master' by 2 commits.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#	modified:   continuousEngine/games/yosenabe.py
#
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
diff --git a/.dontlookinhere/continuousEngine/games/yosenabe.py b/.dontlookinhere/continuousEngine/games/yosenabe.py
index 4acc1fd..ab65ac6 100644
--- a/.dontlookinhere/continuousEngine/games/yosenabe.py
+++ b/.dontlookinhere/continuousEngine/games/yosenabe.py
@@ -1,6 +1,11 @@
 from continuousEngine import *
+import math
 
-debug = True
+debug = False
+
+outr = 3
+midl = 0.5
+sides = 21
 
 a = 1.9
 b = 0.9
@@ -112,6 +117,69 @@ puzzles = [
 (1, [(9.792917,102.1325),(35.294207,102.1325),(35.294207,127.6338),(9.792917,127.6338)])
 ]),
 
+([
+((258.58099, 57.669071), 6, 9.7232141),
+((172.38559, 57.669071), 4, 9.7232141),
+((215.48329, 57.669071), 4, 9.7232141),
+((129.28789, 57.669071), 2, 9.7232141)
+],[
+(0, [(95.434735,102.1905),(120.93603,102.1905),(120.93603,127.69181),(95.434735,127.69181)]),
+(2, [(138.25565,102.1905),(163.75694,102.1905),(163.75694,127.6918),(138.25565,127.6918)]),
+(4, [(181.07656,102.1905),(206.57785,102.1905),(206.57785,127.6918),(181.07656,127.6918)]),
+(0, [(223.89747,102.1905),(249.39876,102.1905),(249.39876,127.6918),(223.89747,127.6918)]),
+(6, [(266.71838,102.1905),(292.21967,102.1905),(292.21967,127.6918),(266.71838,127.6918)])
+]),
+
+([
+((258.58099, 57.669071), 6, 9.7232141),
+((172.38559, 57.669071), 5, 9.7232141),
+((215.48329, 57.669071), 10, 9.7232141),
+((129.28789, 57.669071), 3, 9.7232141)
+],[
+(4, [(95.434735,102.1905),(120.93603,102.1905),(120.93603,127.69181),(95.434735,127.69181)]),
+(9, [(138.25565,102.1905),(163.75694,102.1905),(163.75694,127.6918),(138.25565,127.6918)]),
+(0, [(181.07656,102.1905),(206.57785,102.1905),(206.57785,127.6918),(181.07656,127.6918)]),
+(3, [(223.89747,102.1905),(249.39876,102.1905),(249.39876,127.6918),(223.89747,127.6918)]),
+(0, [(266.71838,102.1905),(292.21967,102.1905),(292.21967,127.6918),(266.71838,127.6918)])
+]),
+
+([
+((235.19565, 99.526207), 9, 9.7232141),
+((235.19565, 76.642769), 9, 9.7232141),
+((235.19565, 122.40965), 9, 9.7232141),
+((235.19565, 145.29309), 9, 9.7232141)
+],[
+(12, [(100.12764,86.184795),(152.12068,86.184795),(152.12068,138.17785),(100.12764,138.17785)]),
+(9, [(178.00785,178.35282),(73.135004,178.35282),(94.868514,149.3748),(153.51452,149.3748)]),
+(7.5, [(58.995968,164.22783),(58.995968,59.354983),(87.973988,81.088493),(87.973988,139.7345)]),
+(3, [(72.536028,46.257552),(177.40886,46.257552),(155.67535,75.235566),(97.029359,75.235566)]),
+(0, [(195.68761,57.967701),(195.68761,162.84055),(166.70959,141.10704),(166.70959,82.461031)])
+]),
+
+([
+((230.92761, 87.291214), 2, 9.7232141),
+((217.26993, 58.148006), 3, 17.405649),
+((239.60594, 105.1953), 1, 4.174788)
+],[
+(2, [(156.84322,89.020224),(132.15625,131.77932),(107.46928,89.020214)]),
+(2, [(157.06534,72.691051),(107.69139,72.691054),(132.37837,29.931962)]),
+(1, [(116.79865,138.90467),(67.424701,138.90467),(92.111681,96.145575)]),
+(1, [(196.93776,139.7854),(147.56381,139.7854),(172.25079,97.026314)])
+]),
+
+([
+    ((6,-1.1), 6, 1),
+    ((6,1.1), 6, 1)
+],[
+    ((0.3 if i == 3 else 1 if i == 13 else 0),
+     [
+        (outr*math.cos(math.pi*2/sides*(i+0.1)), outr*math.sin(math.pi*2/sides*(i+0.1))),
+        (outr*math.cos(math.pi*2/sides*(i+0.9)), outr*math.sin(math.pi*2/sides*(i+0.9))),
+        (midl*math.cos(math.pi*2/sides*(i+0.5)), midl*math.sin(math.pi*2/sides*(i+0.5))),
+    ])
+    for i in range(sides)
+]),
+
 (
     [ ((a, b), 1, r)
     , ((b, -a), 2, r)
@@ -162,7 +230,7 @@ class Ball(Renderable):
         super().__init__(game, Layers.BALL)
         self.s, self.val, self.r, self.t = s, val, r, t
         self.held = False
-        self.satisfied = False
+        self.crocks = 0
     def render(self):
         drawSegment(self.game, Colors.EDGE, self.s, self.t)
         drawCircle(self.game, Colors.BALLHELD if self.held else Colors.BALL, self.t, self.r)
@@ -271,9 +339,10 @@ class Yosenabe(Game):
         return True
 
     def prep_turn(self):
-        for b in self.layers[Layers.BALL]: b.satisfied = False
-        self.satisfied = [(lambda arr: sum(arr) == val if val else len(arr) > 0)([b.val for b in self.layers[Layers.BALL] if intersect_circle_conv_polygon(b.t, b.r, poly) and not setattr(b, 'satisfied', True)]) for (val, poly, _) in self.regions]
-        self.winning = all(self.satisfied) and all(b.satisfied for b in self.layers[Layers.BALL])
+        for b in self.layers[Layers.BALL]: b.crocks = 0
+        pairs = [[b for b in self.layers[Layers.BALL] if intersect_circle_conv_polygon(b.t, b.r, poly) and not setattr(b, 'crocks', b.crocks+1)] for (_, poly, _) in self.regions]
+        self.satisfied = [(lambda arr: abs(sum(arr) - val) < 0.0001 if val else len(arr) > 0)([b.val/b.crocks for b in balls]) for ((val, _, _), balls) in zip(self.regions, pairs)]
+        self.winning = all(self.satisfied) and all(b.crocks for b in self.layers[Layers.BALL])
         if self.winning and self.unlocked < self.pidx+1: self.unlocked = self.pidx+1
         self.background.color = Colors.BGWIN if self.winning else Colors.BGDEFAULT
 
