Thanks. Eventually, one will be able to take a picture of oneself and that will be the gif that chases around the maze. I'm trying to avoid any 'copy write' infringement. I have a little alien that I am trying to incorporate into the maze that will try to find the gif. But as it stands, it's not very interactive which is why I'm hoping someone has the ability to guide me in the direction I need to finish the interactive part with the keyboard event.
I am sorry for not putting a subject line the first time. I suppose I was a little hasty when sending the first post. T From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Tucker Sent: Friday, May 18, 2007 3:27 PM To: tutor@python.org Subject: Re: [Tutor] (no subject) 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 - <mailto:Tutor@python.org> Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor