-
-
Save stephengruppetta/34fc252ffe12af556a6f88acf12bc99d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dot.py | |
import turtle | |
import random | |
class Dot(turtle.Turtle): | |
DOT_COLOURS = "#fdb33b", "#6d227a", "#fff3e6" | |
def __init__(self, x, y): | |
super().__init__() | |
self.shape("circle") | |
self.color(random.choice(self.DOT_COLOURS)) | |
self.penup() | |
self.setposition(x, y) | |
self.setheading(-90) | |
self.dot_speed = 1 | |
def fall(self): | |
self.forward(self.dot_speed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment