You may wish to read the section in HtDP/2e on designing programs:
http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html#%28part._ch~3ahtdp%29
especially
http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html#%28part._.D.K._sec~3adesign-world%29
so that you can solve these problems
Typo:
> This suggests that your reasoning is that only myself is affected by key
events and only 'left and 'right key events
and 'up and 'down, of course.
On Fri, May 2, 2014 at 12:52 AM, Marco Morazan wrote:
> Your on-key-event handler is:
>
> ;Movement of Myself in XY-direction on key-press
Your on-key-event handler is:
;Movement of Myself in XY-direction on key-press
(define (alter-myself-xy-on-key w key)
(cond
[(key=? key 'up)
(make-world (make-posn (posn-x (world-myself w))
(- (posn-y (world-myself w)) key-distance))
(world-s
Hi Zee
Foods: Consider using a list (or set) of foods in your world.
Timer: My 2048 game now has this as an option thanks to John Clements. The
initial state captures the start time and comparison with the current time
can generate the countdown. https://github.com/danprager/racket-2048
How do y
On Thu, May 1, 2014 at 1:26 PM, Zee Ken wrote:
> 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 w
5 matches
Mail list logo