我正在做游戏。随机生成的矩形不会停止。
谢谢。
请查看完整代码https://nopaste.xyz/?f46610fe565a6dc9#FvxSuWMoHEgFIgNeiIDEOT6yQcR0xp74wN1tHd21f+o=
for i in range(1): #the loop that should stop
width2 = random.randint(25, 25)
height2 = random.randint(60, 60)
top = random.randint(412, 412)
left = random.randint(300, 400)
rect = pygame.draw.rect(win, white, (left, top, width2, height2))