diff --git a/docs/classic-port-notes.md b/docs/classic-port-notes.md index ad44973..0acfb89 100644 --- a/docs/classic-port-notes.md +++ b/docs/classic-port-notes.md @@ -21,7 +21,6 @@ src/coolrl_lost_cities/ games/ classic/ game.pyx - reference.py snapshots.py evaluation.py env.py diff --git a/src/coolrl_lost_cities/games/classic/__init__.py b/src/coolrl_lost_cities/games/classic/__init__.py index b0d5b1c..1efc0e3 100644 --- a/src/coolrl_lost_cities/games/classic/__init__.py +++ b/src/coolrl_lost_cities/games/classic/__init__.py @@ -23,7 +23,6 @@ from .game import ( classic_config, ) from .interfaces import Snapshot -from .reference import ReferenceLostCitiesCard, ReferenceLostCitiesState __all__ = [ "GameState", @@ -33,8 +32,6 @@ __all__ = [ "LostCitiesConfig", "LostCitiesEnv", "MatchResult", - "ReferenceLostCitiesCard", - "ReferenceLostCitiesState", "Snapshot", "available_bot_names", "build_bot", diff --git a/src/coolrl_lost_cities/games/classic/reference.py b/src/coolrl_lost_cities/games/classic/reference.py deleted file mode 100644 index e6f2f22..0000000 --- a/src/coolrl_lost_cities/games/classic/reference.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import annotations - -from dataclasses import dataclass -from typing import Any - -from .game import LostCitiesConfig - - -@dataclass(frozen=True, order=True) -class ReferenceLostCitiesCard: - color: int - rank: int - - -class ReferenceLostCitiesState: - """Pure Python reference implementation placeholder.""" - - def __init__(self, config: LostCitiesConfig | None = None, **_: Any) -> None: - self.config = config or LostCitiesConfig() - - @classmethod - def new_game( - cls, - config: LostCitiesConfig | None = None, - *, - seed: int | None = None, - ) -> ReferenceLostCitiesState: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - @classmethod - def new_game_from_deck( - cls, - deck: list[ReferenceLostCitiesCard], - config: LostCitiesConfig | None = None, - ) -> ReferenceLostCitiesState: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - @classmethod - def empty(cls, config: LostCitiesConfig | None = None) -> ReferenceLostCitiesState: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def to_snapshot(self) -> dict[str, Any]: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - @classmethod - def from_snapshot( - cls, - snapshot: dict[str, Any], - *, - validate: bool = True, - ) -> ReferenceLostCitiesState: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def legal_mask(self) -> list[bool]: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def unified_legal_mask(self) -> list[bool]: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def apply_action(self, action_id: int) -> None: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def apply_unified_action(self, action_id: int) -> None: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def total_score(self, player: int) -> int: - raise NotImplementedError("pure Python reference engine is not implemented yet") - - def score_diff(self, player: int = 0) -> int: - raise NotImplementedError("pure Python reference engine is not implemented yet") diff --git a/tests/games/classic/test_reference.py b/tests/games/classic/test_reference.py deleted file mode 100644 index 700cdb0..0000000 --- a/tests/games/classic/test_reference.py +++ /dev/null @@ -1,16 +0,0 @@ -import pytest - -from coolrl_lost_cities.games.classic import ( - LostCitiesConfig, - ReferenceLostCitiesCard, - ReferenceLostCitiesState, -) - - -def test_reference_card_is_plain_ordered_value() -> None: - assert ReferenceLostCitiesCard(0, 1) < ReferenceLostCitiesCard(1, 0) - - -def test_reference_state_placeholder_is_explicitly_unimplemented() -> None: - with pytest.raises(NotImplementedError): - ReferenceLostCitiesState.new_game(LostCitiesConfig())