frontend
Preparing search index...
hooks/useSevensGame
useSevensGame
Function useSevensGame
useSevensGame
()
:
{
cfgCpuStrategy
:
number
;
cfgEndStop
:
boolean
;
cfgJokerConsBan
:
boolean
;
cfgJokerCount
:
number
;
cfgJokerReclaim
:
boolean
;
cfgMaxPasses
:
number
;
cfgNoJokerFinish
:
boolean
;
cfgTunnel
:
boolean
;
cfgTunnelSkipWidth
:
number
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"joker"
,
index
:
number
,
jokerTargetSuit
:
number
,
jokerTargetValue
:
number
,
config
?:
SevensConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleCardPlay
:
(
idx
:
number
)
=>
void
;
handleJokerPlace
:
(
suit
:
number
,
value
:
number
)
=>
void
;
jokerCardIdx
:
number
|
null
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
setCfgCpuStrategy
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgEndStop
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgJokerConsBan
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgJokerCount
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgJokerReclaim
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgMaxPasses
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgNoJokerFinish
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgTunnel
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgTunnelSkipWidth
:
Dispatch
<
SetStateAction
<
number
>
>
;
setJokerCardIdx
:
Dispatch
<
SetStateAction
<
number
|
null
>
>
;
state
:
SevensResponse
|
null
;
}
Hook that manages Sevens game state, joker placement, configuration, and CPU replay.
Returns
{
cfgCpuStrategy
:
number
;
cfgEndStop
:
boolean
;
cfgJokerConsBan
:
boolean
;
cfgJokerCount
:
number
;
cfgJokerReclaim
:
boolean
;
cfgMaxPasses
:
number
;
cfgNoJokerFinish
:
boolean
;
cfgTunnel
:
boolean
;
cfgTunnelSkipWidth
:
number
;
error
:
string
|
null
;
exec
:
(
...
args
:
[
command
:
"reset"
|
"play"
|
"joker"
,
index
:
number
,
jokerTargetSuit
:
number
,
jokerTargetValue
:
number
,
config
?:
SevensConfigInput
,
]
,
)
=>
Promise
<
void
>
;
handleCardPlay
:
(
idx
:
number
)
=>
void
;
handleJokerPlace
:
(
suit
:
number
,
value
:
number
)
=>
void
;
jokerCardIdx
:
number
|
null
;
loading
:
boolean
;
retry
:
()
=>
Promise
<
void
>
;
setCfgCpuStrategy
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgEndStop
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgJokerConsBan
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgJokerCount
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgJokerReclaim
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgMaxPasses
:
Dispatch
<
SetStateAction
<
number
>
>
;
setCfgNoJokerFinish
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgTunnel
:
Dispatch
<
SetStateAction
<
boolean
>
>
;
setCfgTunnelSkipWidth
:
Dispatch
<
SetStateAction
<
number
>
>
;
setJokerCardIdx
:
Dispatch
<
SetStateAction
<
number
|
null
>
>
;
state
:
SevensResponse
|
null
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Hook that manages Sevens game state, joker placement, configuration, and CPU replay.