Added player

This commit is contained in:
2025-12-19 11:42:47 +03:00
parent d82dcb91cc
commit ac2cf5d13b

View File

@@ -10,13 +10,26 @@ screen.title("Asteroid game")
screen.tracer(0) screen.tracer(0)
# === CREATE PLAYER === # === CREATE PLAYER ===
player = turtle.Turtle()
player.hideturtle()
player.color("00FFFF")
player.penup()
player.goto(0, -250)
player.emoji = "^"
player_speed = 20
# === GAME VARIABLES === # === GAME VARIABLES ===
game_active = True
asteroids = []
# === FUNCTIONS === # === FUNCTIONS ===
def draw_player():
player.clear()
player.write(player.emoji, align="center",
font=("Arial",32,"normal"))
draw_player()
screen.update()
turtle.done()
# === TEST CODE === # === TEST CODE ===
# Uncomment this to test: # Uncomment this to test: