dgw / sopel-BombBot

Customized version of a custom version of a bomb module for Sopel
2 stars 1 forks source link

Timeout with "0 seconds" remaining shouldn't be possible #41

Closed dgw closed 3 years ago

dgw commented 7 years ago

Due to how Python handles floating point numbers when interpolated into strings, the remaining seconds are truncated at the decimal point (not rounded). This can lead to the user being told to wait 0 more seconds before bombing again / performing .bomboff.

Timer code should round the value up to the next integer for display, so even if there's less than a second left it still appears as "1 second".