diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-12-15 17:31:00 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-01-06 16:00:25 -0500 |
commit | 291d593a0519d00545dac90ab832c88cfbfde7a3 (patch) | |
tree | a355769c8b5958fbe0c178bd56bad1672f483432 | |
parent | 07475b4dc99d29043fb0c3101db160efef336da8 (diff) |
Add prompt and some helpful output.
-rw-r--r-- | community-garden/edit.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/community-garden/edit.scm b/community-garden/edit.scm index bbfc0ad..3da54ba 100644 --- a/community-garden/edit.scm +++ b/community-garden/edit.scm @@ -18,8 +18,11 @@ (define approved-plants-vow (vat-run (<- garden-vow 'get-approved-plants))) (define gardener (vat-run (spawn ^gardener name garden-vow))) (define running? #t) + (define (read*) + (display "> ") + (read)) (while running? - (match (read) + (match (read*) (('quit) (set! running? #f)) (('get-garden-name) @@ -27,8 +30,10 @@ (lambda (name) (format #t "~a\n" name))))) (('dig-up x y) + (format #t "dig up tile (~a, ~a)\n" x y) (vat-run ($ gardener 'dig-up x y))) (('plant x y) + (format #t "plant in tile (~a, ~a)\n" x y) (vat-run (on approved-plants-vow (match-lambda |