GUI 선택 의존성 준비

맥락:
- pygame GUI 이식 전에 core 설치와 GUI 의존성을 분리하고 asset 로딩 경로를 고정한다.

변경:
- pyproject에 gui extra로 pygame과 pygame-gui를 추가했다.
- classic resource helper를 추가해 packaged asset 경로를 importlib.resources 기반으로 읽게 했다.
- theme asset resource 테스트와 README 설치 안내를 추가했다.

확인:
- uv sync --extra gui
- uv run pytest tests/games/classic
- uv run lost-cities-classic
This commit is contained in:
2026-05-06 19:32:07 +09:00
parent 361420df7a
commit 73fe7e2c94
5 changed files with 141 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
from __future__ import annotations
import json
from coolrl_lost_cities.games.classic.resources import asset_path, theme_path
def test_theme_resource_is_packaged() -> None:
theme = json.loads(theme_path().read_text())
assert isinstance(theme, dict)
def test_asset_path_returns_named_asset() -> None:
assert asset_path("pygame_pvp_theme.json").name == "pygame_pvp_theme.json"