0
0 комментариев
from tkinter import *
from random import *
root = Tk()
root.geometry("1000x700")
root.resizable(0, 0)
canvas = Canvas(width = 1000, height = 700, cursor = "pencil")
canvas.pack()
canvas.create_oval(450, 350, 475, 375, width = 5, fill = "black")
canvas.update()
class Govnar():
    def randommoving(self, x, y, h, z):
        ovalny = canvas.create_oval(x, y, h, z)

pok = Govnar()

x, y = randint(25, 975), randint(25, 675)
h = x + 25
z = y + 25

while True:
    pok.randommoving(x, y, h, z)
    x += 1
    y += 1
    h += 1
    z += 1
    if x == 975:
        x -= 1
        h -= 1
    elif y == 675:
        y -= 1
        z -= 1


Добавить комментарий