frontend
Preparing search index...
hooks/usePyramidGame
usePyramidGame
Function usePyramidGame
usePyramidGame
()
:
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
|
"reset"
|
"log"
|
"draw"
|
"hint"
|
"giveup"
|
"undo"
|
"remove"
,
card1
?:
PyramidRemoveCard
,
card2
?:
PyramidRemoveCard
,
]
,
)
=>
Promise
<
void
>
;
handleDraw
:
()
=>
void
;
handleGiveUp
:
()
=>
void
;
handleHint
:
()
=>
Promise
<
void
>
;
handleReset
:
()
=>
void
;
handleSelectCard
:
(
sel
:
PyramidSelection
,
cardValue
?:
number
)
=>
void
;
handleUndo
:
()
=>
void
;
hint
:
PyramidHint
|
null
;
hintError
:
string
|
null
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCard
:
PyramidSelection
|
null
;
state
:
PyramidResponse
|
null
;
}
Hook that manages Pyramid game state, card selection, hints, and removal actions.
Returns
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
|
"reset"
|
"log"
|
"draw"
|
"hint"
|
"giveup"
|
"undo"
|
"remove"
,
card1
?:
PyramidRemoveCard
,
card2
?:
PyramidRemoveCard
,
]
,
)
=>
Promise
<
void
>
;
handleDraw
:
()
=>
void
;
handleGiveUp
:
()
=>
void
;
handleHint
:
()
=>
Promise
<
void
>
;
handleReset
:
()
=>
void
;
handleSelectCard
:
(
sel
:
PyramidSelection
,
cardValue
?:
number
)
=>
void
;
handleUndo
:
()
=>
void
;
hint
:
PyramidHint
|
null
;
hintError
:
string
|
null
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedCard
:
PyramidSelection
|
null
;
state
:
PyramidResponse
|
null
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Pyramid game state, card selection, hints, and removal actions.