From: Tim Vaughan Date: Fri, 5 Jun 2020 07:23:30 +0000 (+0200) Subject: Fixed water level rendering bug. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=02053d76594093ae83c0cd900ce887fe356927a7;p=microbotany.git Fixed water level rendering bug. --- diff --git a/garden.scm b/garden.scm index ebcdf77..3664612 100644 --- a/garden.scm +++ b/garden.scm @@ -86,7 +86,7 @@ (if last-watered (let* ((now (current-seconds)) (1day (* 24 3600)) - (remaining-pc (quotient (* 100 (- 1day (- now last-watered))) 1day)) + (remaining-pc (quotient (* 100 (max 0 (- 1day (- now last-watered)))) 1day)) (filled (quotient remaining-pc 4)) (unfilled (- 25 filled))) (print "["