The rectangle should be moving but it only moves like one inch I cant figure out what i'm doing wrong, so yeah
import pygame,random,os
pygame.init()
rand=random.Random()
#use https://www.qr-code-generator.com/
#Setup
WIDTH,HEIGHT=210,210
WIN=pygame.display.set_mode((WIDTH,HEIGHT))
pygame.display.set_caption("QR code generator")
WIN.fill((255,255,255))
x=3
run=True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run=False
pygame.draw.rect(WIN, (0,0,0), pygame.Rect(x,0,10,10))
pygame.display.update()
x-=1
the black square should just move right across the top but it moves a little then doesnt at all.