我是pygame的新手。我只是想用 pygame 移动图像但它失败了我的代码是
import pygame
from pygame.locals import*
img = pygame.image.load('tank.jpg')
white = (255, 64, 64)
w = 640
h = 480
screen = pygame.display.set_mode((w, h))
screen.fill((white))
running = 1
while running:
x = 5
x++
y = 10
y++
screen.fill((white))
screen.blit(img,(x,y))
pygame.display.flip()
pygame.update()
我试过这段代码来移动图像。但这对我没有帮助。