about summary refs log tree commit diff stats
path: root/scratch/game.brev
diff options
context:
space:
mode:
Diffstat (limited to 'scratch/game.brev')
-rw-r--r--scratch/game.brev19
1 files changed, 12 insertions, 7 deletions
diff --git a/scratch/game.brev b/scratch/game.brev
index 5b46a72..207f968 100644
--- a/scratch/game.brev
+++ b/scratch/game.brev
@@ -1,5 +1,4 @@
 (import brev mdg)
-(import simple-loops)
 
 (define true #t)
 (define false #f)
@@ -24,9 +23,15 @@
 ; 		(listner game-running))
 ; 	(loop))
 
-(let ((n 4) (lst '()))
-  (do-while (<= 0 n)
-    (set! lst (cons n lst))
-    (set! n (- n 1)))
-  (print "n "n)
-  lst)
\ No newline at end of file
+(define-syntax while
+  (syntax-rules ()
+                ((while cond body ...)
+                 (let loop ()
+                   (when cond
+                     body ...
+                     (loop))))))
+
+(let ((str "PENCHANT") (i 0))
+  (while (< i (string-length str))
+         (print (string-ref str i)) 
+         (set! i (add1 i))))  
\ No newline at end of file