asd
This commit is contained in:
parent
ef045f9353
commit
ff5d6ab91d
7 changed files with 388 additions and 84 deletions
|
|
@ -64,6 +64,11 @@ The script MUST export these functions (no classes, no imports):
|
|||
currentPlayerIndex number — acting player seat index
|
||||
playerCount number — total number of players
|
||||
handCounts number[] — cards held by each player (seat order)
|
||||
turnNumber number — increments each time turn advances
|
||||
roundNumber number — increments when turn wraps to seat 0
|
||||
lastActionType string — start|play|draw|choice|choice_pending|win
|
||||
lastActorIndex number — seat index of actor in last action
|
||||
pendingChoices object[] — pending choice queue (each has targetPlayerIndex,prompt,options)
|
||||
|
||||
card/topCard suit values: "hearts" | "diamonds" | "spades" | "clubs"
|
||||
card/topCard value values: "7" | "8" | "9" | "10" | "under" | "upper" | "king" | "ace"
|
||||
|
|
@ -87,8 +92,10 @@ The script MUST export these functions (no classes, no imports):
|
|||
Additional optional fields allowed in onPlayed return:
|
||||
choicePrompt?: string,
|
||||
choiceOptions?: string[]
|
||||
choiceTargetPlayerIndex?: number
|
||||
When both are provided and choiceOptions has at least 1 item, frontend prompts current player and
|
||||
backend calls onChoice with selected value before turn advances.
|
||||
backend calls onChoice with selected value before turn advances. If a choice is already pending,
|
||||
this new one is queued (chained choices).
|
||||
|
||||
Advanced state mutation fields allowed in onPlayed/onChoice return:
|
||||
playerHands?: Card[][]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue