From 8412883500cb660b47e46b9c890a50e309dcded0 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sun, 26 May 2024 22:54:41 +0800 Subject: [PATCH] [feat] move left --- game.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game.scm b/game.scm index c508066..7f64792 100644 --- a/game.scm +++ b/game.scm @@ -122,11 +122,12 @@ (cond ((string=? key key:left) (dprint "key:" key) + (collide-gelement! (- (car (parentheses-pos (level-left-parenthes *level*))) 1) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*)) (set! *element-x* (- *element-x* 10))) ((string=? key key:right) (dprint "key:" key) (set! *element-x* (+ *element-x* 10)) - (collide-gelement! (+ 1 (car (parentheses-pos (level-left-parenthes *level*)))) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*)) + (collide-gelement! (+ (car (parentheses-pos (level-left-parenthes *level*))) 1) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*)) )))) (add-event-listener! (current-document) "keydown"