[feat] add collide-gelement! func
This commit is contained in:
parent
73e180df88
commit
33bd32b338
1 changed files with 9 additions and 0 deletions
9
game.scm
9
game.scm
|
@ -76,3 +76,12 @@
|
||||||
(vector apple wall wall wall wall)
|
(vector apple wall wall wall wall)
|
||||||
(vector wall wall wall wall wall)
|
(vector wall 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"))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue