Advertisement
Guest User

n

a guest
Apr 20th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. import turtle
  2. import sys
  3. import math
  4.  
  5. lng=turtle.Screen()
  6.  
  7. rs = turtle.Turtle()
  8. rs.hideturtle()
  9. rs.penup()
  10.  
  11. lng = turtle.Screen()
  12.  
  13.  
  14. lng.bgcolor('white')
  15. lng.title('???')
  16. lng.setup(844, 844)
  17.  
  18. gal = ("Done!Click on the text to quit!")
  19.  
  20. canvas = turtle.getcanvas()
  21.  
  22. def end_text():
  23.     rs.goto (-350, 0)
  24.  
  25.     rs.write(gal, font=("Arial", 30, "bold") )
  26.  
  27. def ending():
  28. ##  Some stuff was here before to clean the maze setup turtle and other things, now since this is kind of a jump noone needs it.
  29.  
  30.     lng.bgcolor("white")
  31.  
  32.     end_text()
  33.    
  34. ##    for priesas in priesai:   was a "hide enemies" thing
  35. ##        priesas.hideturtle()
  36.  
  37.     def click_end(event):
  38.         x, y = event.x, event.y
  39.         print('x={}, y={}'.format(x, y))
  40.  
  41.         if (x >= 60 and x <= 815) and (  y >= 360 and y <= 420):
  42.             turtle.onscreenclick(lambda x, y: sys.exit())
  43.  
  44.  
  45.     canvas.bind('<Motion>', click_end)
  46.  
  47.  
  48. ending()
  49.  
  50.  
  51. turtle.done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement