about summary refs log tree commit diff stats
path: root/scratch/game.brev
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-12-16 12:53:34 -0500
committerelioat <hi@eli.li>2023-12-16 12:53:34 -0500
commitacdc3b0d78bf26f9a314e96151fb72b13b6418a5 (patch)
treecf945610a986f6e14d552c93ee1ce18b39ba850e /scratch/game.brev
parent30eb42e65e369705337d2419e06a61a7cab1bfc1 (diff)
downloaddecember-2023-acdc3b0d78bf26f9a314e96151fb72b13b6418a5.tar.gz
*
Diffstat (limited to 'scratch/game.brev')
-rw-r--r--scratch/game.brev25
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