def test_game_module_imports_and_action_maps_are_consistent(): from proteus.game.engine.grid import ( MotiveGridGame, _DIRECTION_DELTAS, _ACTION_TO_GAMEACTION, _GAMEACTION_TO_ACTION, ) # Every *movement* action has a delta and a GameAction, and the reverse map # is exact. "interact" is the lone no-move action: it has a delta (0, 0) but # no dedicated GameAction (it reuses stay's ACTION5 in apply_motive_action), # so it is intentionally absent from _ACTION_TO_GAMEACTION. assert set(_DIRECTION_DELTAS) - {"interact"} == set(_ACTION_TO_GAMEACTION) assert "interact" in _DIRECTION_DELTAS and "interact" not in _ACTION_TO_GAMEACTION assert _GAMEACTION_TO_ACTION == {v: k for k, v in _ACTION_TO_GAMEACTION.items()}