haive.games.nim.standalone_game¶
Standalone game implementation of Nim.
This script allows playing Nim without requiring the full Haive framework.
Classes¶
Manager for the Nim game. |
|
Move in the Nim game. |
|
State for the Nim game. |
|
UI for the Nim game. |
Functions¶
|
Run the Nim game. |
Parse command line arguments. |
Module Contents¶
- class haive.games.nim.standalone_game.NimGameManager[source]¶
Manager for the Nim game.
- class haive.games.nim.standalone_game.NimMove(/, **data)[source]¶
Bases:
pydantic.BaseModel
Move in the Nim game.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.games.nim.standalone_game.NimState(/, **data)[source]¶
Bases:
pydantic.BaseModel
State for the Nim game.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)