]> bicyclesonthemoon.info Git - ott/molpy-up/commitdiff
separate condition for adding and removing platforms
authorb <rowerynaksiezycu@gmail.com>
Fri, 27 Mar 2026 07:39:28 +0000 (08:39 +0100)
committerb <rowerynaksiezycu@gmail.com>
Fri, 27 Mar 2026 07:39:28 +0000 (08:39 +0100)
molpydown.py

index 23a2e97d9f68308bdd9fe18929e2782e4f6d3d84..5c383192751b9ec836c1b07c4f306df47375a977 100644 (file)
@@ -581,12 +581,15 @@ class MolpyUp:
         while True:
             if len(self.platforms) < 1:
                 return
-            if self.platforms[0][1] - self.cameray >= - self.platformSandHeight - self.sy // 12:
-                break
-            self.generateNewPlatform()
-            self.platforms.pop(0)
-            if self.score > 1:
-                self.score -= 1
+            if self.platforms[-1][1] - self.cameray < self.sy * 7 // 6:
+                self.generateNewPlatform()
+                if self.score > 1:
+                    self.score -= 1
+                continue
+            if self.platforms[0][1] - self.cameray < - self.platformSandHeight - self.sy // 6:
+                self.platforms.pop(0)
+                continue
+            break
         for p in self.platforms:
             rect = pygame.Rect(p[0], p[1], p[7], self.platformSandHeight)
             colX = self.playerx % self.sx