TurnOrder
Defined in: src/modules/turn-based/turn-order.ts:10
Whose turn it is, as plain data: an ordered list of seats, the active one,
and counters. Seats are any id (a number, a string, an EntityId), expected
distinct. The value is JSON-safe when the seat type is, so it can sit in a
saved game state as an ordinary field.
Change it only through this module’s operations, which keep active in
range.
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”active
Section titled “active”active:
number
Defined in: src/modules/turn-based/turn-order.ts:12
Index into seats of the seat holding the turn (0 when there are no seats).
direction
Section titled “direction”direction:
-1|1
Defined in: src/modules/turn-based/turn-order.ts:14
Which way advanceTurn walks seats.
rounds
Section titled “rounds”rounds:
number
Defined in: src/modules/turn-based/turn-order.ts:16
Completed rounds: how many times play passed the wrap point.
seats:
T[]
Defined in: src/modules/turn-based/turn-order.ts:18
Seats in play order.
turns:
number
Defined in: src/modules/turn-based/turn-order.ts:20
Completed turns.