basic maze problem with turtle

Alister alister.ware at ntlworld.com
Mon Oct 14 07:29:42 EDT 2013


On Sun, 13 Oct 2013 14:53:36 -0700, baujacob wrote:

> Hi everyone, I'm trying to create a simple maze program. When the user
> finishes the maze, I want to print in big letters "You Win!" and when
> the user hits a wall, I want the user to go back to the beginning of the
> maze. The problem is "collision detection" which is an advanced topic
> and I'm only in a beginning programming class. Is there anyway I can
> force the user back to the starting point when the turtle hits the wall?
> Thank you in advance.

returning the user to the start is a simple case of resetting the user's 
coordinates.

unless you are referring to a true turtle in a physical maze in which 
case your requirement is probably not a good idea (What happens if you 
bump a wall on your way back)

more details of the exact scenario may enable some more pointers in the 
right direction.



-- 
Stop searching forever.  Happiness is just next to you.



More information about the Python-list mailing list