Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from tkinter import *
  2. import random
  3. import time
  4.  
  5. class Ball:
  6. def __init__(self, canvas, color):
  7. self.canvas = canvas
  8. self.id = canvas.create_oval(10, 10, 25, 25, fill=collor)
  9. self.canvas.move(self.id, 245, 100)
  10.  
  11. def draw(self):
  12. ball = Ball(canvas, 'red')
  13. pass
  14. tk = Tk()
  15. tk.title("Game")
  16. tk.resizable(0,0)
  17. tk.wm_attributes("-topmost", 1)
  18. canvas = Canvas(tk, width=500, height=400, bd=0, highlightthickness=0)
  19. canvas.pack()
  20. tk.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement