From: b Date: Thu, 26 Mar 2026 23:08:05 +0000 (+0100) Subject: don't break game when no more platforms X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=2e7cc43b5bef7ecb6659192f381bff6a97678d39;p=ott%2Fmolpy-up don't break game when no more platforms --- diff --git a/molpyup.py b/molpyup.py index 3e0a268..bd18fe4 100644 --- a/molpyup.py +++ b/molpyup.py @@ -579,7 +579,11 @@ class MolpyUp: self.platforms.append(platform) def updatePlatforms(self): - while self.platforms[0][1] - self.cameray > self.sy + self.sy // 12: + while True: + if len(self.platforms) < 1: + return + if self.platforms[0][1] - self.cameray <= self.sy + self.sy // 12: + break self.generateNewPlatform() self.platforms.pop(0) if self.score < self.scoreEpilogue: