This commit is contained in:
Alvan
2026-05-28 11:02:48 +08:00
parent 55e62594ae
commit 80f1c993ee
3 changed files with 19 additions and 0 deletions

BIN
images/playership1_blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/ufored.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

19
main.py
View File

@@ -0,0 +1,19 @@
import pgzrun
WIDTH = 800
HEIGHT = 600
ship = Actor('playership1_blue')
ship.x = 370
ship.y = 550
def update():
if keyboard.left:
ship.x = ship.x - 5
if keyboard.right:
ship.x = ship.x + 5
def draw():
ship.draw()
pgzrun.go() # Must be last line