Skip to content

Turn Management

Joseph Newman edited this page Sep 22, 2021 · 2 revisions

Built-in Turn Management

Spite comes bundled with six default turn schemes (though since this is still in Alpha, many of these are planned and still need to be implemented):

  • Discrete Team
  • Discrete Player
  • Discrete Teammate (not implemented as of alpha 0.3.0)
  • Simultaneous Team (not implemented as of alpha 0.3.0)
  • Simultaneous Teammate (not implemented as of alpha 0.3.0)
  • Simultaneous Player (not implemented as of alpha 0.3.0)

This turn schemes can be selected by passing one of the supported values defined in the TurnSchemeTypes enum to the Arena Builder's SetTurnScheme method.

Discrete Team

The Discrete Team turn scheme means that turns are assigned to teams, as in games in the Fire Emblem, Paper Mario, and Advance Wars series.

With this turn scheme, all members of a team are expected to act (even if that action is "no action") before that team's turn ends. This means that the teammate implementation also implements the ITappableTeammate interface, and the team itself implements the ITeamOfTappables interface. An ITappableTeammate comes with a bool that determines whether or not the teammate has acted yet by asking if it is "tapped". The ITeamOfTappables checks against this when the Turn Manager wants to know if the phase should be advanced. When the turn manager hands the turn back to the team, it will be sure to untap/refresh/restore action to each teammate automatically.

Discrete Player

This turn scheme means that Players are the ones who take actions, as in chess or battleship.

With this turn scheme, teams need to implement the ITeamExecutor interface defined in the Spite.Turns namespace. Currently, as soon as a team takes an action, the turn manager passes the action over to the other player. This is planned to be changed sometime in the future.

Discrete Teammate

When this is implemented, this turn scheme will have turns behave like in Octopath Traveler or Triangle Strategy, in that turns are assigned to individual teammates based on some sorting order.

Simultaneous Team

When this is implemented, this turn scheme will have turns behave like in Pokemon, in that all players will issue their commands all at once. The commands will then be executed based on some sorting order.

Simultaneous Teammate

Same as Simultaneous Team, but with individual teammates instead of all of them at once.

Simultaneous Player

This turn scheme, when implemented, will be good for games such as Rock, Paper, Scissors.

Clone this wiki locally