The Lambda Lab
/
projects
/
microbotany.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed imports.
[microbotany.git]
/
garden.scm
diff --git
a/garden.scm
b/garden.scm
index
1bd504b
..
bf6cc48
100644
(file)
--- a/
garden.scm
+++ b/
garden.scm
@@
-1,12
+1,3
@@
-(import (chicken random)
- (chicken time)
- (chicken time posix)
- (chicken pathname)
- (chicken io)
- (chicken string)
- (chicken format)
- srfi-1)
-
(define rand-double pseudo-random-real)
(define (rand-weighted weights)
(define rand-double pseudo-random-real)
(define (rand-weighted weights)
@@
-84,7
+75,7
@@
(if last-watered
(let* ((now (current-seconds))
(1day (* 24 3600))
(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 "["
(filled (quotient remaining-pc 4))
(unfilled (- 25 filled)))
(print "["