Feb-18-2018, 11:06 AM
(This post was last modified: Feb-18-2018, 02:21 PM by sparkz_alot.)
Can somebody help? The goal of the game is, that you have a turtle, that you control with arrows, and the turtle paints down color as it moves. How you win - you fill up the whole screen with your color, and that is the part of the code, that I don' have.
Code:

import turtle import math troncycle = turtle.Turtle() screen = turtle.Screen() troncycle.pensize(75) troncycle.color("dark blue") troncycle.pencolor("blue") turtle.setup(500, 500) troncycle.penup() troncycle.left(180) troncycle.forward(25) troncycle.pendown() def moveright(): troncycle.right(90) def moveleft(): troncycle.left(90) for i in range(100000): troncycle.forward(2) screen.listen() screen.onkeypress(moveright, "Right") screen.onkeypress(moveleft, "Left")