diff options
author | elioat <hi@eli.li> | 2023-12-16 12:53:34 -0500 |
---|---|---|
committer | elioat <hi@eli.li> | 2023-12-16 12:53:34 -0500 |
commit | acdc3b0d78bf26f9a314e96151fb72b13b6418a5 (patch) | |
tree | cf945610a986f6e14d552c93ee1ce18b39ba850e /scratch/game.brev | |
parent | 30eb42e65e369705337d2419e06a61a7cab1bfc1 (diff) | |
download | december-2023-acdc3b0d78bf26f9a314e96151fb72b13b6418a5.tar.gz |
*
Diffstat (limited to 'scratch/game.brev')
-rw-r--r-- | scratch/game.brev | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scratch/game.brev b/scratch/game.brev new file mode 100644 index 0000000..cc62149 --- /dev/null +++ b/scratch/game.brev @@ -0,0 +1,25 @@ +(import brev mdg) + +(define true #t) +(define false #f) +(define game-running true) + +(define (menu msg) + (print msg)) + +(define start-game "start game") +(define game-over "game over") + +(define (listner game-running) + (display " > ") + (define user-input (read)) + (if (eq? user-input "quit") + ((set! game-running false) (print game-running)) + (print "continue")) + game-running) + +(let loop () + (if (eq? game-running true) + (listner game-running) + (print "game isn't running")) + (loop)) \ No newline at end of file |