Add the Player class and the Up key binding

Task: MIL-003#1
Task: MIL-003#2
Task: MIL-003#3
This commit is contained in:
2026-10-13 13:56:40 +08:00
parent 8632d60518
commit 71498a9f67
6 changed files with 159 additions and 30 deletions
+18
View File
@@ -0,0 +1,18 @@
"""Shared fixtures. Tests that need a window skip when no display is available."""
import tkinter
import turtle
import pytest
@pytest.fixture(scope="session")
def screen() -> turtle.TurtleScreen:
"""A single hidden turtle screen shared by the tests that draw."""
try:
game_screen = turtle.Screen()
except tkinter.TclError:
pytest.skip("no display available")
game_screen.tracer(0)
game_screen.getcanvas().winfo_toplevel().withdraw()
return game_screen