]> git.armaanb.net Git - lightcards.git/commitdiff
Change how percent done is calculated
authorArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 22:18:54 +0000 (17:18 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 22:18:54 +0000 (17:18 -0500)
Last card is no longer 100%

lightcards/display.py

index 7e09cdced19e81a614ed117a7530c3cd98fbf2bd..3f55a56c225c66ce9a71a687343dfa775c921ab8 100755 (executable)
@@ -35,7 +35,7 @@ class Display():
             percent = "100"
         else:
             percent = str(round(self.obj.getIdx() /
-                                (len(self.stack) - 1) * 100)).zfill(3)
+                                len(self.stack) * 100)).zfill(3)
 
         # Print yellow if starred
         self.win.addstr(mlines - 1, 0, "[", curses.color_pair(1))