Added player

This commit is contained in:
2025-12-19 11:39:51 +03:00
parent c15ee4ed3f
commit 34790107a3

View File

@@ -10,13 +10,25 @@ 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
asteroides =[]
# === 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: