frontend
Preparing search index...
hooks/useDoubtGame
useDoubtGame
Function useDoubtGame
useDoubtGame
()
:
{
claimedValue
:
number
;
clearSelection
:
()
=>
void
;
countdown
:
number
|
null
;
doubtConfig
:
DoubtConfig
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"doubt"
|
"skip"
,
cardIndices
?:
number
[]
,
claimedValue
?:
number
,
doubterIndices
?:
number
[]
,
config
?:
DoubtConfig
,
humanPlayMs
?:
number
,
profile
?:
unknown
,
]
,
)
=>
Promise
<
void
>
;
handleConfigChange
:
(
key
:
NumberKeys
<
DoubtConfig
>
,
value
:
string
)
=>
void
;
handleConfigToggle
:
(
key
:
BooleanKeys
<
DoubtConfig
>
,
value
:
boolean
)
=>
void
;
handleCpuDoubtConfirm
:
()
=>
void
;
handleDoubt
:
()
=>
void
;
handlePlay
:
()
=>
void
;
handleSkip
:
()
=>
void
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCardIndices
:
number
[]
;
setClaimedValue
:
Dispatch
<
SetStateAction
<
number
>
>
;
state
:
DoubtResponse
|
null
;
stopCountdown
:
()
=>
void
;
toggleCard
:
(
idx
:
number
)
=>
void
;
}
Hook that manages Doubt game state, countdown timer, and player actions.
Returns
{
claimedValue
:
number
;
clearSelection
:
()
=>
void
;
countdown
:
number
|
null
;
doubtConfig
:
DoubtConfig
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"doubt"
|
"skip"
,
cardIndices
?:
number
[]
,
claimedValue
?:
number
,
doubterIndices
?:
number
[]
,
config
?:
DoubtConfig
,
humanPlayMs
?:
number
,
profile
?:
unknown
,
]
,
)
=>
Promise
<
void
>
;
handleConfigChange
:
(
key
:
NumberKeys
<
DoubtConfig
>
,
value
:
string
)
=>
void
;
handleConfigToggle
:
(
key
:
BooleanKeys
<
DoubtConfig
>
,
value
:
boolean
)
=>
void
;
handleCpuDoubtConfirm
:
()
=>
void
;
handleDoubt
:
()
=>
void
;
handlePlay
:
()
=>
void
;
handleSkip
:
()
=>
void
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCardIndices
:
number
[]
;
setClaimedValue
:
Dispatch
<
SetStateAction
<
number
>
>
;
state
:
DoubtResponse
|
null
;
stopCountdown
:
()
=>
void
;
toggleCard
:
(
idx
:
number
)
=>
void
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Doubt game state, countdown timer, and player actions.