frontend
Preparing search index...
hooks/useMemoryGame
useMemoryGame
Function useMemoryGame
useMemoryGame
()
:
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"log"
|
"next"
|
"flip"
,
position
?:
number
,
config
?:
MemoryConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleConfigChange
:
(
key
:
"cpuDifficulty"
,
value
:
string
)
=>
void
;
handleFlip
:
(
pos
:
number
)
=>
void
;
handleNext
:
()
=>
void
;
loading
:
boolean
;
memoryConfig
:
MemoryConfig
;
retry
:
()
=>
Promise
<
void
>
;
state
:
MemoryResponse
|
null
;
}
Hook that manages Memory game state, card flipping, and configuration.
Returns
{
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"log"
|
"next"
|
"flip"
,
position
?:
number
,
config
?:
MemoryConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleConfigChange
:
(
key
:
"cpuDifficulty"
,
value
:
string
)
=>
void
;
handleFlip
:
(
pos
:
number
)
=>
void
;
handleNext
:
()
=>
void
;
loading
:
boolean
;
memoryConfig
:
MemoryConfig
;
retry
:
()
=>
Promise
<
void
>
;
state
:
MemoryResponse
|
null
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Memory game state, card flipping, and configuration.