games.multi_player.models¶

Models for multi-player game framework.

This module provides common enumerations and base models used across multi-player games. These models serve as building blocks for creating game-specific implementations.

Example

>>> from haive.agents.agent_games.framework.multi_player.models import GamePhase
>>>
>>> # Use game phases in your game state
>>> current_phase = GamePhase.SETUP
>>> if current_phase == GamePhase.MAIN:
...     # Handle main game phase
...     pass

Classes¶

GamePhase

Common game phases that many games share.

Module Contents¶

class games.multi_player.models.GamePhase¶

Bases: str, enum.Enum

Common game phases that many games share.

This enumeration defines standard game phases that are common across different types of games. Games can extend or modify these phases based on their specific needs.

SETUP¶

Initial game setup phase for player assignments, etc.

Type:

str

MAIN¶

Main gameplay phase where core game actions occur.

Type:

str

SCORING¶

Phase for calculating and updating scores.

Type:

str

END¶

Game conclusion phase for final state updates.

Type:

str

Example

>>> phase = GamePhase.SETUP
>>> if phase == GamePhase.MAIN:
...     # Handle main game phase
...     pass
>>> # Check if game is over
>>> is_game_over = phase == GamePhase.END

Initialize self. See help(type(self)) for accurate signature.