Very cool! Where is Inky, Blinky, Pinky, and Clyde? ;-) Maybe dog catchers
would be better foes for Dusty.


On 5/18/07, Teresa Stanton <[EMAIL PROTECTED]> 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
the
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
purpose.
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
turn.
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
effect
the current course through the maze? Does it somehow update the current
call
to find_all_paths?
Or some sort of Helper function that interrupts the current path at a
vertex
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
appreciated.

TYIA

T

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to