<br><div class="gmail_quote">On Fri, Jul 15, 2011 at 2:56 PM, Stephen Bloch <span dir="ltr"><<a href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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.<br>
<br></blockquote><div><br></div><div> 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.</div>
</div><br>