diff --git a/src/settings.py b/src/settings.py index 4055ea3..2cd5b08 100644 --- a/src/settings.py +++ b/src/settings.py @@ -1,4 +1,24 @@ # --- DESK --- +from typing import Mapping, Literal, Tuple + DESK_WIDTH = 70 DESK_HEIGHT = 40 + + +# Players Constants / Settings +# Valid movement/animation directions. +Direction = Literal["down", "left", "right", "up"] + +# Sprite files are grouped by direction. +# Example: "down" uses sprite_01.png, sprite_02.png, sprite_03.png. +DIRECTION_FRAMES: Mapping[Direction, Tuple[int, int, int]] = { + "down": (1, 2, 3), + "left": (4, 5, 6), + "right": (7, 8, 9), + "up": (10, 11, 12), +} + +# Default drawing size and animation speed. +DEFAULT_SPRITE_HEIGHT: int = 138 +DEFAULT_FRAME_TIME: float = 0.16