Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #56830
| References | <4c8e9740-25ef-4531-89db-467eb18c673f@googlegroups.com> <cf3c97fc-2761-41f7-b98a-9083f96bb57c@googlegroups.com> |
|---|---|
| From | Joshua Landau <joshua@landau.ws> |
| Date | 2013-10-14 23:58 +0100 |
| Subject | Re: basic maze problem with turtle |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1083.1381791532.18130.python-list@python.org> (permalink) |
On 13 October 2013 23:18, <baujacob@gmail.com> wrote:
> import turtle
> userTurtle = turtle.Turtle()
> draw = turtle.Turtle()
> scr = turtle.Screen()
>
> def drawMaze():
> draw.pencolor("gold")
[lots of lines]
> print(userTurtle.pos())
>
> scr.onkeypress(m1, "Up")
> scr.onkeypress(m2, "Left")
> scr.onkeypress(m3, "Right")
> scr.onkeypress(m4, "Down")
>
> scr.listen()
>
> drawMaze()
> mazeGame()
You might realise that you don't actually have a "maze" in the sense
that you need something a *computer* can understand.
You need some data structure to hold the maze which you have drawn.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
basic maze problem with turtle baujacob@gmail.com - 2013-10-13 14:52 -0700
Re: basic maze problem with turtle baujacob@gmail.com - 2013-10-13 15:18 -0700
Re: basic maze problem with turtle Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-13 21:53 -0400
Re: basic maze problem with turtle Joshua Landau <joshua@landau.ws> - 2013-10-14 23:58 +0100
csiph-web