diff options
Diffstat (limited to 'net/ricketyspace')
-rw-r--r-- | net/ricketyspace/ror/six/snake.rkt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ricketyspace/ror/six/snake.rkt b/net/ricketyspace/ror/six/snake.rkt index 2931375..abe0a28 100644 --- a/net/ricketyspace/ror/six/snake.rkt +++ b/net/ricketyspace/ror/six/snake.rkt @@ -88,6 +88,10 @@ (define (close? s g) (posn=? s (goo-loc g))) +(define (grow-size sn size) + (cond [(= size 0) sn] + [else (grow-size (grow sn) (- size 1))])) + (define (grow sn) (snake (snake-dir sn) (cons (next-head sn) (snake-segs sn)))) |