diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-12-15 09:22:13 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-01-06 16:00:25 -0500 |
commit | 38069bc3f0ef425e056184c55a3f1e9c17edcb8b (patch) | |
tree | 6cf66b24e76868ac93c2b5b45236fc1181236ea0 | |
parent | 309fd1ac41cb1dffe65599743bf884871287e508 (diff) |
s/guard/gate/
-rw-r--r-- | community-garden.scm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/community-garden.scm b/community-garden.scm index f0429c9..105d2ce 100644 --- a/community-garden.scm +++ b/community-garden.scm @@ -117,12 +117,12 @@ (unseal-plant plant) (error "plant is not allowed" plant))))) -(define (^garden-guard bcom botanist) +(define (^garden-gate bcom botanist) (methods ((check-plant plant) ($ botanist 'check-plant plant)))) -(define (^garden bcom name garden-bed garden-guard) +(define (^garden bcom name garden-bed garden-gate) (define (ensure-empty x y) (when (garden-bed-ref garden-bed x y) (error "tile already has something planted in it" x y))) @@ -131,12 +131,12 @@ ((get-bed) garden-bed) ((plant x y sealed-plant) (ensure-empty x y) - (let* ((plant ($ garden-guard 'check-plant sealed-plant)) + (let* ((plant ($ garden-gate 'check-plant sealed-plant)) (new-bed (garden-bed-set garden-bed x y plant))) - (bcom (^garden bcom name new-bed garden-guard)))) + (bcom (^garden bcom name new-bed garden-gate)))) ((dig-up x y) (let ((new-bed (garden-bed-set garden-bed x y #f))) - (bcom (^garden bcom name new-bed garden-guard)))))) + (bcom (^garden bcom name new-bed garden-gate)))))) (define (^visitor bcom name garden) (methods @@ -159,7 +159,7 @@ (<- garden 'dig-up x y)))) (define the-botanist (garden-run (spawn ^botanist))) -(define the-garden-guard (garden-run (spawn ^garden-guard the-botanist))) +(define the-garden-gate (garden-run (spawn ^garden-gate the-botanist))) (define sunflower/approved (garden-run ($ the-botanist 'approve-plant sunflower))) (define cabbage/approved @@ -169,7 +169,7 @@ (spawn ^garden "Spritely Institute Community Garden" (make-garden-bed 8 8) - the-garden-guard))) + the-garden-gate))) (define alice (alice-run (spawn ^gardener "Alice" our-garden))) (alice-run ($ alice 'plant 1 1 sunflower/approved)) |