Mode

from dgisim import Mode

Mode is a class used to describe the game mode. It has full control to define how a game should be run.

Mode acts as an abstract class, and it has a number of subclasses as implementations.

class Mode

Base Mode for all modes.

A mode is what that contains all configurations for a ‘version’ of a game.

e.g. It contains how many cards a player can have, how many summons can a player have…

abstract property action_phase: type[Phase]
Returns:

the Action Phase.

abstract property card_select_phase: type[Phase]
Returns:

the Card Select Phase.

abstract property end_phase: type[Phase]
Returns:

the End Phase.

abstract property first_phase: type[Phase]
Returns:

the initial phase of a new game.

abstract property game_end_phase: type[Phase]
Returns:

the Game End Phase.

phase_code(phase: Phase | type[Phase]) int
Returns:

the code of the given phase.

abstract property roll_phase: type[Phase]
Returns:

the Roll Phase.

abstract property starting_hand_select_phase: type[Phase]
Returns:

the Starting Hand Select Phase.

More could be customized like the maximum number of cards that can be held, the hand card limit, … But these may undergo big design changes, so won’t be specified in the documentation.