Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / GameState

Interface: GameState

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:254

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
console
.
log
(
matchSnapshot
)

Indexable

[k: string]: unknown

Properties

actionAbilities

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
actionAbilities
} =
matchSnapshot
console
.
log
(
actionAbilities
)

actionAbilities: ActionAbilityView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:255


activePlayer?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
activePlayer
} =
matchSnapshot
console
.
log
(
activePlayer
)

optional activePlayer?: Seat | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:256


availableAttacks

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
availableAttacks
} =
matchSnapshot
console
.
log
(
availableAttacks
)

availableAttacks: AvailableAttackView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:257


availableCounters?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
availableCounters
} =
matchSnapshot
console
.
log
(
availableCounters
)

optional availableCounters?: TwinSunsCounter[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:258


consecutivePasses

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
consecutivePasses
} =
matchSnapshot
console
.
log
(
consecutivePasses
)

consecutivePasses: number

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:259


eventsApplied

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
eventsApplied
} =
matchSnapshot
console
.
log
(
eventsApplied
)

eventsApplied: number

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:260


format

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
format
} =
matchSnapshot
console
.
log
(
format
)

format: "trilogy" | "sealed" | "draft" | "premier" | "eternal" | "twinSuns"

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:264

Match format requested at creation time.


groundArena

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
groundArena
} =
matchSnapshot
console
.
log
(
groundArena
)

groundArena: UnitStateView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:265


initiative

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
initiative
} =
matchSnapshot
console
.
log
(
initiative
)

initiative: InitiativeState

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:266


leaderAction?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
leaderAction
} =
matchSnapshot
console
.
log
(
leaderAction
)

optional leaderAction?: LeaderActionView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:267


matchId

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
matchId
} =
matchSnapshot
console
.
log
(
matchId
)

matchId: string

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:268


pendingAbilities

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilities
} =
matchSnapshot
console
.
log
(
pendingAbilities
)

pendingAbilities: PendingAbilityView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:269


pendingAbilityAspectChoice?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilityAspectChoice
} =
matchSnapshot
console
.
log
(
pendingAbilityAspectChoice
)

optional pendingAbilityAspectChoice?: PendingAbilityAspectChoiceView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:270


pendingAbilityAttackChoice?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilityAttackChoice
} =
matchSnapshot
console
.
log
(
pendingAbilityAttackChoice
)

optional pendingAbilityAttackChoice?: PendingAbilityAttackChoiceView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:271


pendingAbilityCardChoice?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilityCardChoice
} =
matchSnapshot
console
.
log
(
pendingAbilityCardChoice
)

optional pendingAbilityCardChoice?: PendingAbilityCardChoiceView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:272


pendingAbilityModeChoice?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilityModeChoice
} =
matchSnapshot
console
.
log
(
pendingAbilityModeChoice
)

optional pendingAbilityModeChoice?: PendingAbilityModeChoiceView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:273


pendingAbilityNameChoice?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingAbilityNameChoice
} =
matchSnapshot
console
.
log
(
pendingAbilityNameChoice
)

optional pendingAbilityNameChoice?: PendingAbilityNameChoiceView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:274


pendingIndirectDamage?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
pendingIndirectDamage
} =
matchSnapshot
console
.
log
(
pendingIndirectDamage
)

optional pendingIndirectDamage?: PendingIndirectDamageView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:275


phase

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
phase
} =
matchSnapshot
console
.
log
(
phase
)

phase: MatchPhase

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:276


playActions

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
playActions
} =
matchSnapshot
console
.
log
(
playActions
)

playActions: PlayActionView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:277


playerCount

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
playerCount
} =
matchSnapshot
console
.
log
(
playerCount
)

playerCount: number

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:281

Configured number of seats in clockwise order.


players

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
players
} =
matchSnapshot
console
.
log
(
players
)

players: SeatState[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:282


prompt

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
prompt
} =
matchSnapshot
console
.
log
(
prompt
)

prompt: PromptState

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:283


rejectedPlayReasons

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
rejectedPlayReasons
} =
matchSnapshot
console
.
log
(
rejectedPlayReasons
)

rejectedPlayReasons: RejectedPlayView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:284


result?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
result
} =
matchSnapshot
console
.
log
(
result
)

optional result?: MatchResult | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:285


roundNumber

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
roundNumber
} =
matchSnapshot
console
.
log
(
roundNumber
)

roundNumber: number

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:286


seed

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
seed
} =
matchSnapshot
console
.
log
(
seed
)

seed: number

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:287


series

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
series
} =
matchSnapshot
console
.
log
(
series
)

series: MatchSeriesView

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:288


spaceArena

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
spaceArena
} =
matchSnapshot
console
.
log
(
spaceArena
)

spaceArena: UnitStateView[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:289


status

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
status
:
healthStatus
} =
matchSnapshot
console
.
log
(
healthStatus
)

status: MatchStatus

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:290


twinSunsCounters?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
twinSunsCounters
} =
matchSnapshot
console
.
log
(
twinSunsCounters
)

optional twinSunsCounters?: TwinSunsCountersView | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:291


winner?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
winner
} =
matchSnapshot
console
.
log
(
winner
)

optional winner?: Seat | null

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:292


winners?

Example:

ts
import { 
createSimulatorClient
} from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes. const
simulatorClient
=
createSimulatorClient
({
baseUrl
: 'http://127.0.0.1:4000',
}) // Public match fetch returns the latest snapshot projection. const
matchSnapshot
= await
simulatorClient
.
matches
.
get
('match_123')
const {
winners
} =
matchSnapshot
console
.
log
(
winners
)

optional winners?: Seat[]

Defined in: packages/ts-sdk/src/generated/types/game-state.ts:293

Released under the MIT License.