Facebook
From izyaan, 3 Years ago, written in Python for S60.
Embed
Download Paste or View Raw
Hits: 262
  1. import turtle
  2.  
  3. wn = turtle.Screen()
  4. wn.title("Cookie Clicker by @TokyoEdtech")
  5. wn.bgcolor("black")
  6.  
  7. wn.register_shape("cookie.gif")
  8.  
  9. cookie = turtle.Turtle()
  10. cookie.shape("cookie.gif")
  11. cookie.speed(0)
  12.  
  13. clicks = 0
  14.  
  15. pen = turtle.Turtle()
  16. pen.hideturtle()
  17. pen.color("white")
  18. pen.penup()
  19. pen.goto(0, 400)
  20. pen.write(f"Clicks: {clicks}", align="center", font=("Courier New", 32, "normal"))
  21.  
  22. def clicked(x, y):
  23.     global clicks
  24.     clicks += 1
  25.     pen.clear()
  26.     pen.write(f"Clicks: {clicks}", align="center", font=("Courier New", 32, "normal"))
  27.  
  28. cookie.onclick(clicked)
  29.  
  30. wn.mainloop()
  31.