Advertisement
DaniilWild

Untitled

Mar 28th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #начало игры
  2. import play
  3. from random import randint
  4.  
  5. w = play.screen.width
  6. h = play.screen.height
  7.  
  8. #создание объектов для внешнего интерфейса
  9. place1 = play.new_box(color = 'light green', x = 0, y = 0, width = 100, height = 200, border_width=5, border_color='green')
  10. place2 = play.new_box(color = 'light green', x = 0, y = 0, width = 100, height = 200, border_width=5, border_color='green')
  11. place3 = play.new_box(color = 'light green', x = 0, y = 0, width = 100, height = 200, border_width=5, border_color='green')
  12. button = play.new_box(color = 'yellow', x = 0, y = 0, width = 150, height = 50)
  13.  
  14.  
  15. @play.when_program_starts
  16. def start():
  17. place1.x = -200
  18. place2.x = 0
  19. place3.x = 200
  20. button.y = 170
  21.  
  22. @play.repeat_forever
  23. def do():
  24. pass
  25.  
  26. @button.when_clicked
  27. async def clicking():
  28. pass
  29. play.start_program()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement