summaryrefslogtreecommitdiffstats
path: root/net/ricketyspace
diff options
context:
space:
mode:
Diffstat (limited to 'net/ricketyspace')
-rw-r--r--net/ricketyspace/ror/fourteen/server.rkt9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ricketyspace/ror/fourteen/server.rkt b/net/ricketyspace/ror/fourteen/server.rkt
index e551b2f..8088b40 100644
--- a/net/ricketyspace/ror/fourteen/server.rkt
+++ b/net/ricketyspace/ror/fourteen/server.rkt
@@ -279,13 +279,16 @@ The server is responsible for:
;; determine left-over foods
(define (eat-all-the-things player foods)
(define b (ip-body player))
- (define (new-cupcake)
- (create-a-body CUPCAKE))
+ (define (new-cupcakes)
+ (cond [(> (length foods) 10) '()]
+ [else
+ (for/list ([i (in-range (random 1 3))])
+ (create-a-body CUPCAKE))]))
(for/fold ([foods '()]) ([f foods])
(cond
[(body-collide? f b)
(set-body-size! b (+ PLAYER-FATTEN-DELTA (body-size b)))
- (cons (new-cupcake) foods)]
+ (append foods (new-cupcakes))]
[else (cons f foods)])))
;; body body -> Boolean