[Tutor] (no subject)
tktucker at gmail.com
Sat May 19 00:27:13 CEST 2007
Very cool! Where is Inky, Blinky, Pinky, and Clyde? ;-) Maybe dog catchers
would be better foes for Dusty.
On 5/18/07, Teresa Stanton <tms43 at clearwire.net> wrote:
> Hi all:
> Remember when I was having problems moving my .gif around my Tkinter maze?
> Well, I was going about it all wrong (as some pointed out). What REALLY
> works is a graph. I used a dictionary, the keys are main coordinates that
> are a path that the .gif follows using a greedy algorithm that finds all
> paths to a determined location. The definition of the keys are all the
> possible directions the .gif can go. Not all paths are covered on
> In any case, here is the updated code, for those who asked me to post it.
> I'm hoping to have it completed next week, without the gif of my dog (lol)
> and a bad guy or two to follow the gif that will be used in the maze.
> The next thing I have to do is bind an event to the arrow keys that will
> update the current x and y position.. I haven't quite worked that out yet.
> Right now the gif moves through the maze based on the path. Now the event
> (an keyboard arrow) should tell it to go to that direction at the next
> The function that defines the move is called move_gif(). I could use some
> ideas because I keep getting stuck on the details. How does the event
> the current course through the maze? Does it somehow update the current
> to find_all_paths?
> Or some sort of Helper function that interrupts the current path at a
> giving it a new path? That one seems most likely, but I'm still stuck on
> how to stop at the vertex and move to the new location. Any help would be
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor