frontend
Preparing search index...
hooks/useKlondikeGame
useKlondikeGame
Function useKlondikeGame
useKlondikeGame
()
:
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
|
"reset"
|
"log"
|
"draw"
|
"hint"
|
"move"
|
"giveup"
|
"autocomplete"
|
"undo"
,
from
?:
KlondikeMoveZone
,
to
?:
KlondikeMoveZone
,
config
?:
KlondikeConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleAutoComplete
:
()
=>
void
;
handleDraw
:
()
=>
void
;
handleGiveUp
:
()
=>
void
;
handleHint
:
()
=>
Promise
<
void
>
;
handleReset
:
()
=>
void
;
handleResetWithConfig
:
(
config
:
KlondikeConfigInput
)
=>
void
;
handleSelectSource
:
(
zone
:
KlondikeMoveZone
)
=>
void
;
handleSelectTarget
:
(
zone
:
KlondikeMoveZone
)
=>
void
;
handleUndo
:
()
=>
void
;
hint
:
KlondikeHint
|
null
;
hintError
:
string
|
null
;
isAutoCompleting
:
boolean
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedSource
:
KlondikeMoveZone
|
null
;
state
:
KlondikeResponse
|
null
;
}
Hook that manages Klondike game state, source selection, hints, and moves.
Returns
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
|
"reset"
|
"log"
|
"draw"
|
"hint"
|
"move"
|
"giveup"
|
"autocomplete"
|
"undo"
,
from
?:
KlondikeMoveZone
,
to
?:
KlondikeMoveZone
,
config
?:
KlondikeConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleAutoComplete
:
()
=>
void
;
handleDraw
:
()
=>
void
;
handleGiveUp
:
()
=>
void
;
handleHint
:
()
=>
Promise
<
void
>
;
handleReset
:
()
=>
void
;
handleResetWithConfig
:
(
config
:
KlondikeConfigInput
)
=>
void
;
handleSelectSource
:
(
zone
:
KlondikeMoveZone
)
=>
void
;
handleSelectTarget
:
(
zone
:
KlondikeMoveZone
)
=>
void
;
handleUndo
:
()
=>
void
;
hint
:
KlondikeHint
|
null
;
hintError
:
string
|
null
;
isAutoCompleting
:
boolean
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
selectedSource
:
KlondikeMoveZone
|
null
;
state
:
KlondikeResponse
|
null
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Klondike game state, source selection, hints, and moves.