Kit's Clicky Garden Adventure

by Kit Krueger

01 Feb 2016

You may notice a theme. This is an early scene from Through the Looking Glass; it’s the one where Alice explores the garden of talking flowers. Warning: In keeping with the original text, this game is nonsensical and rather insulting.

All in all, I’m pleased with it, but there are a few minor glitches. I acknowledge that I got a little carried away with the setup, but it’s important for context. Is there a way to make the speed faster than 10? This would make it much more efficient. Also, is there a way to do the setup all at once and go directly into the game? If the whole picture could just appear, that would save time. As it is, the garden code is long and repetitive.

def roses():
  gardener.penup()
  gardener.goto(-120,120)
  gardener.fill(True)
  gardener.fillcolor("darkred")
  gardener.circle(10)

Most of that repeats for each flower. I’ve not found a quicker method, as each is at a new coordinate. I am slightly puzzled that the flowers on the bottom half aren’t perfectly symmetrical with those on the top - they are closer to the path, but the coordinates should mirror everything. I’ve accepted it as an aesthetic choice made by the universe.

The towards function does not seem to work, so I may not be using it properly. Here is mine.

redqueen.towards(0,200)

It works for one of the setup turtles, but not here (she goes in the correct direction but does not turn to face that way).

Another problem that appeared in setup sometimes was that the architect turtle became disoriented and placed the house in unexpected places. It did this when the house function was left in the landscape.py section, so I put it back in the main body of code, but I don’t know why; there shouldn’t have been a difference.

The surprise glitches are appropriate to a Lewis Carroll theme, but I suppose I should understand why they happen for future reference.

Kit is an LS student who enjoys academic libraries as well as holding coats and snickering. Find Kit Krueger on Twitter, Github, and on the web.