Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
fixed cooldown not having modulus
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyhuang07 committed Jan 13, 2024
1 parent 5cdfd1f commit 58ba853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ def task(statVar, x, y, n):
if cd <= 0:
canClick[n-1] = True
money += BIarr[n - 1] * amounts[n - 1]
secs = round(cd/1000)
secs = round(cd/1000 % 60)
mins = round(cd/60000)
cooldown = '{mins:02d}:{secs:02d}'.format(mins=mins, secs=secs)
centerText(cooldown, lightS, LIGHT1, x + boxW / 4 - 10 + boxW / (4 / 3) / 1.4 + 6, y + boxH / 2 + 1, boxW / (4.66) + 5, boxH / 2)
else:
cd = cooldowns[n-1]
secs = round(cd/1000)
secs = round(cd/1000 % 60)
mins = round(cd/60000)
cooldown = '{mins:02d}:{secs:02d}'.format(mins=mins, secs=secs)
centerText(cooldown, lightS, LIGHT1, x + boxW / 4 - 10 + boxW / (4 / 3) / 1.4 + 6, y + boxH / 2 + 1, boxW / (4.66) + 5, boxH / 2)
Expand Down

0 comments on commit 58ba853

Please sign in to comment.