浏览代码

fix: restart c1 mixed level if fraction equals 0

lairaalmas 4 月之前
父节点
当前提交
80f3ce5570
共有 1 个文件被更改,包括 2 次插入2 次删除
  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;
 
       let isBeforeMin = (isAfterMax = false);
-      let finalPosition = self.control.correctX;
+      let finalPosition = self.control.correctX.toFixed(1);
       // Restart if
       // In Game mode 'a' and 'b' : Kite position is out of bounds
       if (gameOperation === 'minus') {
@@ -508,7 +508,7 @@ const circleOne = {
         isAfterMax =
           finalPosition < validPath.x0 - 5 * validPath.distanceBetweenPoints;
       } else {
-        isBeforeMin = finalPosition < validPath.x0;
+        isBeforeMin = finalPosition <= validPath.x0;
         isAfterMax =
           finalPosition > validPath.x0 + 5 * validPath.distanceBetweenPoints;
       }