Procházet zdrojové kódy

fix: restart c1 mixed level if fraction equals 0

lairaalmas před 5 měsíci
rodič
revize
80f3ce5570
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      js/games/circleOne.js

+ 2 - 2
js/games/circleOne.js

@@ -500,7 +500,7 @@ const circleOne = {
         self.circles.list[0].info.distance * self.circles.list[0].info.direc;
         self.circles.list[0].info.distance * self.circles.list[0].info.direc;
 
 
       let isBeforeMin = (isAfterMax = false);
       let isBeforeMin = (isAfterMax = false);
-      let finalPosition = self.control.correctX;
+      let finalPosition = self.control.correctX.toFixed(1);
       // Restart if
       // Restart if
       // In Game mode 'a' and 'b' : Kite position is out of bounds
       // In Game mode 'a' and 'b' : Kite position is out of bounds
       if (gameOperation === 'minus') {
       if (gameOperation === 'minus') {
@@ -508,7 +508,7 @@ const circleOne = {
         isAfterMax =
         isAfterMax =
           finalPosition < validPath.x0 - 5 * validPath.distanceBetweenPoints;
           finalPosition < validPath.x0 - 5 * validPath.distanceBetweenPoints;
       } else {
       } else {
-        isBeforeMin = finalPosition < validPath.x0;
+        isBeforeMin = finalPosition <= validPath.x0;
         isAfterMax =
         isAfterMax =
           finalPosition > validPath.x0 + 5 * validPath.distanceBetweenPoints;
           finalPosition > validPath.x0 + 5 * validPath.distanceBetweenPoints;
       }
       }