From 33bd32b338777330ac1f801ad34e1377e94029ac Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sun, 26 May 2024 10:46:37 +0800 Subject: [PATCH] [feat] add collide-gelement! func --- game.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/game.scm b/game.scm index d9aeecb..bedfe9d 100644 --- a/game.scm +++ b/game.scm @@ -76,3 +76,12 @@ (vector apple wall wall wall wall) (vector wall wall wall wall wall) (vector wall wall wall wall wall))) + +(define (collide-gelement! x y) + (let ((e (vector-ref (vector-ref ppp x) y))) + (if (gelement-interact? (gelement-type e)) + (begin (display "True") + (newline) + (display (gelement-type-iamge (gelement-type e)))) + (display "False")))) +