frontend
Preparing search index...
hooks/useCrazyEightsGame
useCrazyEightsGame
Function useCrazyEightsGame
useCrazyEightsGame
()
:
{
clearSelection
:
()
=>
void
;
crazyEightsConfig
:
CrazyEightsConfig
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"draw"
|
"nextround"
|
"suit"
,
cardIndex
?:
number
,
suit
?:
number
,
config
?:
CrazyEightsConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleChooseSuit
:
(
suit
:
number
)
=>
void
;
handleConfigChange
:
(
key
:
NumberKeys
<
CrazyEightsConfig
>
,
value
:
string
,
)
=>
void
;
handleDraw
:
()
=>
void
;
handleNextRound
:
()
=>
void
;
handlePlay
:
()
=>
void
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCardIndices
:
number
[]
;
state
:
CrazyEightsResponse
|
null
;
toggleCard
:
(
idx
:
number
)
=>
void
;
}
Hook that manages Crazy Eights game state and player actions.
Returns
{
clearSelection
:
()
=>
void
;
crazyEightsConfig
:
CrazyEightsConfig
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"draw"
|
"nextround"
|
"suit"
,
cardIndex
?:
number
,
suit
?:
number
,
config
?:
CrazyEightsConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleChooseSuit
:
(
suit
:
number
)
=>
void
;
handleConfigChange
:
(
key
:
NumberKeys
<
CrazyEightsConfig
>
,
value
:
string
,
)
=>
void
;
handleDraw
:
()
=>
void
;
handleNextRound
:
()
=>
void
;
handlePlay
:
()
=>
void
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCardIndices
:
number
[]
;
state
:
CrazyEightsResponse
|
null
;
toggleCard
:
(
idx
:
number
)
=>
void
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Crazy Eights game state and player actions.