Player
src.model.player
¶
Player domain model.
A player owns a collection of units and tracks the currently selected unit and attack. The class intentionally contains only player state; input handling and turn management are performed by controller and game-loop classes.
The documentation follows Google-style docstrings so tools such as pdoc, Sphinx Napoleon, or MkDocs-based pipelines can expose parameters, return values, and side effects in a consistent HTML API reference.
Player
¶
Container for the units controlled by one player.
The class keeps the player's name, units, selected unit, and selected attack. It does not implement input or turn logic directly.
This model is a lightweight container and does not implement combat or rendering behavior directly.
Notes
This class is documented as part of the public project API and is intended to be readable in generated HTML documentation.
Source code in src\model\player.py
select_unit()
¶
Store the unit currently marked as selected, if any.
Returns:
| Name | Type | Description |
|---|---|---|
None |
This method is executed for its side effects. |