[racket] WORLD manipulation doubt
Hi,
I am creating a game which runs in the below world.
(define-struct world (myself monster1 monster2 food1 food2))
The objective of the game is to move yourself in the world, not get hit by
monsters and eat the food.
I am done with
1) Keyboard manipulation of *myself*,
2) Stopping the game when I hit any of the monsters (monsters move randomly
in the world).
*Question1:* Placing the food is also an easy task. But, how do I modify
the world when I eat the food?
I am thinking of writing a procedure that checks if the user hit a SPACE
button and is also near the food. If both of these are true, then that
particular food image at the location should disappear and the game should
continue.
*Question2:* Also, are there any timer events in racket where I can include
a stop clock counting down from a number to zero?
I am a bit confused as to how I should tackle the idea.
Best,
Zeek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140501/06f3da2d/attachment.html>