On Fri, Jul 15, 2011 at 2:56 PM, Stephen Bloch <sbl...@adelphi.edu> wrote:

> The problem is that some sprite actions (most obviously, "move" when you're
> in pen-down mode) affect not only the sprite itself but the world's picture.
>  So far the least-bad solution I've come up with is to hide a mutation of
> that picture inside the otherwise-functional "move" function.
>
>
 Why don't you just have the picture generated based on the state of the
sprite each tick of the animation, just as in HtDP "world"? Functions like
move, rotate, etc. produce a modified sprite, and when that sprite gets
passed to the draw handler, the draw handler produces a new image of the
world based on that state.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to