import "github.com/yuta-yoshinaga/go_trumpcards/internal/adapter/controller"const (
// SessionMaxIDLen is the maximum allowed length of a session ID.
SessionMaxIDLen = 256
// SessionMaxCount is the maximum number of concurrent sessions.
SessionMaxCount = 10000
// SessionTTL is the inactivity duration after which a session is evicted.
SessionTTL = 1 * time.Hour
)MaxCardIndices カードインデックスの最大数 (52枚デッキ)
const MaxCardIndices = 52NewBaccaratWebController and NewBaccaratWebControllerWithProvider are the standard and provider-backed constructors for BaccaratWebController.
var NewBaccaratWebController, NewBaccaratWebControllerWithProvider = webControllerPair[usecase.BaccaratInteractorIF, BaccaratWebInput, *BaccaratWebOutput](
newBaccaratDefaultOutput, baccaratDispatch,
)NewBlackJackWebController and NewBlackJackWebControllerWithProvider are the standard and provider-backed constructors for BlackJackWebController.
var NewBlackJackWebController, NewBlackJackWebControllerWithProvider = webControllerPair[usecase.BlackJackInteractorIF, BlackJackWebInput, *BlackJackWebOutput](
newBlackJackDefaultOutput, blackJackDispatch,
)NewBridgeWebController and NewBridgeWebControllerWithProvider are the standard and provider-backed constructors for BridgeWebController.
var NewBridgeWebController, NewBridgeWebControllerWithProvider = webControllerPair[usecase.BridgeInteractorIF, BridgeWebInput, *BridgeWebOutput](
newBridgeDefaultOutput, bridgeDispatch,
)NewCanastaWebController and NewCanastaWebControllerWithProvider are the standard and provider-backed constructors for CanastaWebController.
var NewCanastaWebController, NewCanastaWebControllerWithProvider = webControllerPair[usecase.CanastaInteractorIF, CanastaWebInput, *CanastaWebOutput](
newCanastaDefaultOutput, canastaDispatch,
)NewClockSolitaireWebController and NewClockSolitaireWebControllerWithProvider are the standard and provider-backed constructors for ClockSolitaireWebController.
var NewClockSolitaireWebController, NewClockSolitaireWebControllerWithProvider = webControllerPair[usecase.ClockSolitaireInteractorIF, ClockSolitaireWebInput, *ClockSolitaireWebOutput](
newClockSolitaireDefaultOutput, clockSolitaireDispatch,
)NewCrazyEightsWebController and NewCrazyEightsWebControllerWithProvider are the standard and provider-backed constructors for CrazyEightsWebController.
var NewCrazyEightsWebController, NewCrazyEightsWebControllerWithProvider = webControllerPair[usecase.CrazyEightsInteractorIF, CrazyEightsWebInput, *CrazyEightsWebOutput](
newCrazyEightsDefaultOutput, crazyEightsDispatch,
)NewCribbageWebController and NewCribbageWebControllerWithProvider are the standard and provider-backed constructors for CribbageWebController.
var NewCribbageWebController, NewCribbageWebControllerWithProvider = webControllerPair[usecase.CribbageInteractorIF, CribbageWebInput, *CribbageWebOutput](
newCribbageDefaultOutput, cribbageDispatch,
)NewDaifugoWebController and NewDaifugoWebControllerWithProvider are the standard and provider-backed constructors for DaifugoWebController.
var NewDaifugoWebController, NewDaifugoWebControllerWithProvider = webControllerPair[usecase.DaifugoInteractorIF, DaifugoWebInput, *DaifugoWebOutput](
newDaifugoDefaultOutput, daifugoDispatch,
)NewDoubtWebController and NewDoubtWebControllerWithProvider are the standard and provider-backed constructors for DoubtWebController.
var NewDoubtWebController, NewDoubtWebControllerWithProvider = webControllerPair[usecase.DoubtInteractorIF, DoubtWebInput, *DoubtWebOutput](
newDoubtDefaultOutput, doubtDispatch,
)NewEuchreWebController and NewEuchreWebControllerWithProvider are the standard and provider-backed constructors for EuchreWebController.
var NewEuchreWebController, NewEuchreWebControllerWithProvider = webControllerPair[usecase.EuchreInteractorIF, EuchreWebInput, *EuchreWebOutput](
newEuchreDefaultOutput, euchreDispatch,
)NewFreeCellWebController and NewFreeCellWebControllerWithProvider are the standard and provider-backed constructors for FreeCellWebController.
var NewFreeCellWebController, NewFreeCellWebControllerWithProvider = webControllerPair[usecase.FreeCellInteractorIF, FreeCellWebInput, *FreeCellWebOutput](
newFreeCellDefaultOutput, freeCellDispatch,
)NewGinRummyWebController and NewGinRummyWebControllerWithProvider are the standard and provider-backed constructors for GinRummyWebController.
var NewGinRummyWebController, NewGinRummyWebControllerWithProvider = webControllerPair[usecase.GinRummyInteractorIF, GinRummyWebInput, *GinRummyWebOutput](
newGinRummyDefaultOutput, ginRummyDispatch,
)NewGoFishWebController and NewGoFishWebControllerWithProvider are the standard and provider-backed constructors for GoFishWebController.
var NewGoFishWebController, NewGoFishWebControllerWithProvider = webControllerPair[usecase.GoFishInteractorIF, GoFishWebInput, *GoFishWebOutput](
newGoFishDefaultOutput, goFishDispatch,
)NewGolfWebController and NewGolfWebControllerWithProvider are the standard and provider-backed constructors for GolfWebController.
var NewGolfWebController, NewGolfWebControllerWithProvider = webControllerPair[usecase.GolfInteractorIF, GolfWebInput, *GolfWebOutput](
newGolfDefaultOutput, golfDispatch,
)NewHeartsWebController and NewHeartsWebControllerWithProvider are the standard and provider-backed constructors for HeartsWebController.
var NewHeartsWebController, NewHeartsWebControllerWithProvider = webControllerPair[usecase.HeartsInteractorIF, HeartsWebInput, *HeartsWebOutput](
newHeartsDefaultOutput, heartsDispatch,
)NewHoldemWebController and NewHoldemWebControllerWithProvider are the standard and provider-backed constructors for HoldemWebController.
var NewHoldemWebController, NewHoldemWebControllerWithProvider = webControllerPair[usecase.HoldemInteractorIF, HoldemWebInput, *HoldemWebOutput](
newHoldemDefaultOutput, holdemDispatch,
)NewIndianPokerWebController and NewIndianPokerWebControllerWithProvider are the standard and provider-backed constructors for IndianPokerWebController.
var NewIndianPokerWebController, NewIndianPokerWebControllerWithProvider = webControllerPair[usecase.IndianPokerInteractorIF, IndianPokerWebInput, *IndianPokerWebOutput](
newIndianPokerDefaultOutput, indianPokerDispatch,
)NewKlondikeWebController and NewKlondikeWebControllerWithProvider are the standard and provider-backed constructors for KlondikeWebController.
var NewKlondikeWebController, NewKlondikeWebControllerWithProvider = webControllerPair[usecase.KlondikeInteractorIF, KlondikeWebInput, *KlondikeWebOutput](
newKlondikeDefaultOutput, klondikeDispatch,
)NewMemoryWebController and NewMemoryWebControllerWithProvider are the standard and provider-backed constructors for MemoryWebController.
var NewMemoryWebController, NewMemoryWebControllerWithProvider = webControllerPair[usecase.MemoryInteractorIF, MemoryWebInput, *MemoryWebOutput](
newMemoryDefaultOutput, memoryDispatch,
)NewNapoleonWebController and NewNapoleonWebControllerWithProvider are the standard and provider-backed constructors for NapoleonWebController.
var NewNapoleonWebController, NewNapoleonWebControllerWithProvider = webControllerPair[usecase.NapoleonInteractorIF, NapoleonWebInput, *NapoleonWebOutput](
newNapoleonDefaultOutput, napoleonDispatch,
)NewOhHellWebController and NewOhHellWebControllerWithProvider are the standard and provider-backed constructors for OhHellWebController.
var NewOhHellWebController, NewOhHellWebControllerWithProvider = webControllerPair[usecase.OhHellInteractorIF, OhHellWebInput, *OhHellWebOutput](
newOhHellDefaultOutput, ohHellDispatch,
)NewOldMaidWebController and NewOldMaidWebControllerWithProvider are the standard and provider-backed constructors for OldMaidWebController.
var NewOldMaidWebController, NewOldMaidWebControllerWithProvider = webControllerPair[usecase.OldMaidInteractorIF, OldMaidWebInput, *OldMaidWebOutput](
newOldMaidDefaultOutput, oldMaidDispatch,
)NewOmahaWebController and NewOmahaWebControllerWithProvider are the standard and provider-backed constructors for OmahaWebController.
var NewOmahaWebController, NewOmahaWebControllerWithProvider = webControllerPair[usecase.OmahaInteractorIF, OmahaWebInput, *OmahaWebOutput](
newOmahaDefaultOutput, omahaDispatch,
)NewPigsTailWebController and NewPigsTailWebControllerWithProvider are the standard and provider-backed constructors for PigsTailWebController.
var NewPigsTailWebController, NewPigsTailWebControllerWithProvider = webControllerPair[usecase.PigsTailInteractorIF, PigsTailWebInput, *PigsTailWebOutput](
newPigsTailDefaultOutput, pigsTailDispatch,
)NewPineappleWebController and NewPineappleWebControllerWithProvider are the standard and provider-backed constructors for PineappleWebController.
var NewPineappleWebController, NewPineappleWebControllerWithProvider = webControllerPair[usecase.PineappleInteractorIF, PineappleWebInput, *PineappleWebOutput](
newPineappleDefaultOutput, pineappleDispatch,
)NewPinochleWebController and NewPinochleWebControllerWithProvider are the standard and provider-backed constructors for PinochleWebController.
var NewPinochleWebController, NewPinochleWebControllerWithProvider = webControllerPair[usecase.PinochleInteractorIF, PinochleWebInput, *PinochleWebOutput](
newPinochleDefaultOutput, pinochleDispatch,
)NewPokerWebController and NewPokerWebControllerWithProvider are the standard and provider-backed constructors for PokerWebController.
var NewPokerWebController, NewPokerWebControllerWithProvider = webControllerPair[usecase.PokerInteractorIF, PokerWebInput, *PokerWebOutput](
newPokerDefaultOutput, pokerDispatch,
)NewPyramidWebController and NewPyramidWebControllerWithProvider are the standard and provider-backed constructors for PyramidWebController.
var NewPyramidWebController, NewPyramidWebControllerWithProvider = webControllerPair[usecase.PyramidInteractorIF, PyramidWebInput, *PyramidWebOutput](
newPyramidDefaultOutput, pyramidDispatch,
)NewSevenCardStudWebController and NewSevenCardStudWebControllerWithProvider are the standard and provider-backed constructors for SevenCardStudWebController.
var NewSevenCardStudWebController, NewSevenCardStudWebControllerWithProvider = webControllerPair[usecase.SevenCardStudInteractorIF, SevenCardStudWebInput, *SevenCardStudWebOutput](
newSevenCardStudDefaultOutput, sevenCardStudDispatch,
)NewSevensWebController and NewSevensWebControllerWithProvider are the standard and provider-backed constructors for SevensWebController.
var NewSevensWebController, NewSevensWebControllerWithProvider = webControllerPair[usecase.SevensInteractorIF, SevensWebInput, *SevensWebOutput](
newSevensDefaultOutput, sevensDispatch,
)NewShortDeckWebController and NewShortDeckWebControllerWithProvider are the standard and provider-backed constructors for ShortDeckWebController.
var NewShortDeckWebController, NewShortDeckWebControllerWithProvider = webControllerPair[usecase.ShortDeckInteractorIF, ShortDeckWebInput, *ShortDeckWebOutput](
newShortDeckDefaultOutput, shortDeckDispatch,
)NewSpadesWebController and NewSpadesWebControllerWithProvider are the standard and provider-backed constructors for SpadesWebController.
var NewSpadesWebController, NewSpadesWebControllerWithProvider = webControllerPair[usecase.SpadesInteractorIF, SpadesWebInput, *SpadesWebOutput](
newSpadesDefaultOutput, spadesDispatch,
)NewSpeedWebController and NewSpeedWebControllerWithProvider are the standard and provider-backed constructors for SpeedWebController.
var NewSpeedWebController, NewSpeedWebControllerWithProvider = webControllerPair[usecase.SpeedInteractorIF, SpeedWebInput, *SpeedWebOutput](
newSpeedDefaultOutput, speedDispatch,
)NewSpiderWebController and NewSpiderWebControllerWithProvider are the standard and provider-backed constructors for SpiderWebController.
var NewSpiderWebController, NewSpiderWebControllerWithProvider = webControllerPair[usecase.SpiderInteractorIF, SpiderWebInput, *SpiderWebOutput](
newSpiderDefaultOutput, spiderDispatch,
)NewThreeCardWebController and NewThreeCardWebControllerWithProvider are the standard and provider-backed constructors for ThreeCardWebController.
var NewThreeCardWebController, NewThreeCardWebControllerWithProvider = webControllerPair[usecase.ThreeCardInteractorIF, ThreeCardWebInput, *ThreeCardWebOutput](
newThreeCardDefaultOutput, threeCardDispatch,
)NewTriPeaksWebController and NewTriPeaksWebControllerWithProvider are the standard and provider-backed constructors for TriPeaksWebController.
var NewTriPeaksWebController, NewTriPeaksWebControllerWithProvider = webControllerPair[usecase.TriPeaksInteractorIF, TriPeaksWebInput, *TriPeaksWebOutput](
newTriPeaksDefaultOutput, triPeaksDispatch,
)NewVideoPokerWebController and NewVideoPokerWebControllerWithProvider are the standard and provider-backed constructors for VideoPokerWebController.
var NewVideoPokerWebController, NewVideoPokerWebControllerWithProvider = webControllerPair[usecase.VideoPokerInteractorIF, VideoPokerWebInput, *VideoPokerWebOutput](
newVideoPokerDefaultOutput, videoPokerDispatch,
)ActionLogWebEntry 棋譜エントリWebアウトプット
type ActionLogWebEntry struct {
TurnNumber int `json:"turnNumber"`
PlayerIdx int `json:"playerIdx"`
ActionType string `json:"actionType"`
Detail string `json:"detail"`
Cards []*WebOutputCard `json:"cards,omitempty"`
}ActionLogWebOutput 棋譜Webアウトプット
type ActionLogWebOutput struct {
Entries []*ActionLogWebEntry `json:"entries"`
}BaccaratCuiController バカラCUIコントローラークラス
type BaccaratCuiController struct {
// contains filtered or unexported fields
}### func NewBaccaratCuiController
func NewBaccaratCuiController(bi usecase.BaccaratInteractorIF) *BaccaratCuiControllerNewBaccaratCuiController コンストラクタ
### func (*BaccaratCuiController) Exec
func (bcc *BaccaratCuiController) Exec(command string) stringExec ゲーム実行 コマンド例: “r”, “b 100 0”, “ch”, “q”
BaccaratWebController バカラWebコントローラークラス
type BaccaratWebController = GameWebController[usecase.BaccaratInteractorIF, BaccaratWebInput, *BaccaratWebOutput]BaccaratWebInput バカラWebインプット
type BaccaratWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
BetType *int `json:"betType,omitempty"`
PlayerPairBet *int `json:"playerPairBet,omitempty"`
BankerPairBet *int `json:"bankerPairBet,omitempty"`
}BaccaratWebOutput バカラWebアウトプット
type BaccaratWebOutput struct {
PlayerHand []*WebOutputCard `json:"playerHand"`
BankerHand []*WebOutputCard `json:"bankerHand"`
PlayerHandValue int `json:"playerHandValue"`
BankerHandValue int `json:"bankerHandValue"`
Phase int `json:"phase"`
Chips int `json:"chips"`
BetAmount int `json:"betAmount"`
BetType int `json:"betType"`
Result int `json:"result"`
Payout int `json:"payout"`
History []int `json:"history"`
PlayerPairBet int `json:"playerPairBet"`
BankerPairBet int `json:"bankerPairBet"`
SideBetResults []*BaccaratWebOutputSideBetResult `json:"sideBetResults"`
WebOutputBase
}## type BaccaratWebOutputSideBetResult
BaccaratWebOutputSideBetResult サイドベット結果
type BaccaratWebOutputSideBetResult struct {
BetType int `json:"betType"`
ResultType int `json:"resultType"`
ResultName string `json:"resultName"`
BetAmount int `json:"betAmount"`
Payout int `json:"payout"`
}BaseWebInput holds fields common to all game WebInput structs.
type BaseWebInput struct {
Command string `json:"command"`
SessionID string `json:"sessionId"`
N *int `json:"n,omitempty"`
}### func (BaseWebInput) GetCommand
func (b BaseWebInput) GetCommand() stringGetCommand returns the command string.
### func (BaseWebInput) GetSessionID
func (b BaseWebInput) GetSessionID() stringGetSessionID returns the session ID string.
## type BlackJackCuiController
BlackJackCuiController ブラックジャックCUIコントローラークラス
type BlackJackCuiController struct {
// contains filtered or unexported fields
}### func NewBlackJackCuiController
func NewBlackJackCuiController(bji usecase.BlackJackInteractorIF) *BlackJackCuiControllerNewBlackJackCuiController コンストラクタ
### func (*BlackJackCuiController) Exec
func (bcc *BlackJackCuiController) Exec(command string) stringExec ゲーム実行 コマンド例: “r”, “h”, “s”, “b 100”, “d”, “sp”, “i”, “di”, “q”
## type BlackJackWebController
BlackJackWebController ブラックジャックWebコントローラークラス
type BlackJackWebController = GameWebController[usecase.BlackJackInteractorIF, BlackJackWebInput, *BlackJackWebOutput]BlackJackWebInput ブラックジャックWebインプット
type BlackJackWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
DealerHitsSoft17 *bool `json:"dealerHitsSoft17,omitempty"`
CpuPlayerCount *int `json:"cpuPlayerCount,omitempty"`
CountingEnabled *bool `json:"countingEnabled,omitempty"`
DoubleAfterSplit *bool `json:"doubleAfterSplit,omitempty"`
CountingSystem *int `json:"countingSystem,omitempty"`
DeckPenetration *int `json:"deckPenetration,omitempty"`
PerfectPairsBet *int `json:"perfectPairsBet,omitempty"`
TwentyOnePlus3Bet *int `json:"twentyOnePlus3Bet,omitempty"`
HandCount *int `json:"handCount,omitempty"`
SurrenderRule *int `json:"surrenderRule,omitempty"`
}### func (BlackJackWebInput) HasConfigParams
func (p BlackJackWebInput) HasConfigParams() boolHasConfigParams reports whether any config parameter is set in the input.
### func (BlackJackWebInput) ToConfig
func (p BlackJackWebInput) ToConfig() domain.BlackJackConfigToConfig builds a BlackJackConfig from the web input pointer fields.
BlackJackWebOutput ブラックジャックWebアウトプット
type BlackJackWebOutput struct {
Dealer *BlackJackWebOutputPlayer `json:"dealer"`
Player *BlackJackWebOutputPlayer `json:"player"`
Hands []*BlackJackWebOutputHand `json:"hands,omitempty"`
CurrentHandIdx int `json:"currentHandIdx"`
Phase int `json:"phase"`
InsuranceBet int `json:"insuranceBet"`
InsuranceAvailable bool `json:"insuranceAvailable"`
HintEnabled bool `json:"hintEnabled"`
SuggestedAction int `json:"suggestedAction"`
DeckCount int `json:"deckCount"`
DealerHitsSoft17 bool `json:"dealerHitsSoft17"`
CountingEnabled bool `json:"countingEnabled"`
CpuPlayerCount int `json:"cpuPlayerCount"`
RunningCount int `json:"runningCount"`
TrueCount float64 `json:"trueCount"`
CpuPlayers []*BlackJackWebOutputCpuSeat `json:"cpuPlayers,omitempty"`
PerfectPairsBet int `json:"perfectPairsBet"`
TwentyOnePlus3Bet int `json:"twentyOnePlus3Bet"`
SideBetResults []*BlackJackWebOutputSideBetResult `json:"sideBetResults,omitempty"`
DoubleAfterSplit bool `json:"doubleAfterSplit"`
CountingSystem int `json:"countingSystem"`
DeckPenetration int `json:"deckPenetration"`
MultiHandCount int `json:"multiHandCount"`
SurrenderRule int `json:"surrenderRule"`
WebOutputBase
}## type BlackJackWebOutputCpuSeat
BlackJackWebOutputCpuSeat CPUプレイヤー席アウトプット
type BlackJackWebOutputCpuSeat struct {
Chips int `json:"chips"`
Hands []*BlackJackWebOutputHand `json:"hands"`
InsuranceBet int `json:"insuranceBet"`
}## type BlackJackWebOutputHand
BlackJackWebOutputHand ブラックジャックWebアウトプットハンド
type BlackJackWebOutputHand struct {
Score int `json:"score"`
Cards []*WebOutputCard `json:"cards"`
Bet int `json:"bet"`
Stood bool `json:"stood"`
Doubled bool `json:"doubled"`
Busted bool `json:"busted"`
IsBlackJack bool `json:"isBlackJack"`
CanSplit bool `json:"canSplit"`
Surrendered bool `json:"surrendered"`
CanSurrender bool `json:"canSurrender"`
}## type BlackJackWebOutputPlayer
BlackJackWebOutputPlayer ブラックジャックWebアウトプットプレイヤー
type BlackJackWebOutputPlayer struct {
Score int `json:"score"`
Cards []*WebOutputCard `json:"cards"`
Chips int `json:"chips"`
}## type BlackJackWebOutputSideBetResult
BlackJackWebOutputSideBetResult サイドベット結果アウトプット
type BlackJackWebOutputSideBetResult struct {
BetType int `json:"betType"`
ResultType int `json:"resultType"`
ResultName string `json:"resultName"`
BetAmount int `json:"betAmount"`
Payout int `json:"payout"`
}BridgeCuiController ブリッジCUIコントローラークラス
type BridgeCuiController struct {
// contains filtered or unexported fields
}### func NewBridgeCuiController
func NewBridgeCuiController(bi usecase.BridgeInteractorIF) *BridgeCuiControllerNewBridgeCuiController コンストラクタ
### func (*BridgeCuiController) Exec
func (c *BridgeCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
b / bid <type> [level] [suit] → ビッド (type: 0=Pass, 1=Normal, 2=Double, 3=Redouble)
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ
sd / setdifficulty <0-2> → CPU難易度設定
h / hint → ヒント表示
log / l → 棋譜表示
BridgeWebConfig ブリッジWeb設定
type BridgeWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
}### func (*BridgeWebConfig) ToConfig
func (c *BridgeWebConfig) ToConfig() domain.BridgeConfigToConfig builds a BridgeConfig from the nested web config, applying bounds checking.
BridgeWebController ブリッジWebコントローラークラス
type BridgeWebController = GameWebController[usecase.BridgeInteractorIF, BridgeWebInput, *BridgeWebOutput]BridgeWebInput ブリッジWebインプット
type BridgeWebInput struct {
BaseWebInput
BidType *int `json:"bidType,omitempty"`
BidLevel *int `json:"bidLevel,omitempty"`
BidSuit *int `json:"bidSuit,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *BridgeWebConfig `json:"config,omitempty"`
}### func (BridgeWebInput) ToConfig
func (p BridgeWebInput) ToConfig() domain.BridgeConfigToConfig builds a BridgeConfig from the web input.
BridgeWebOutput ブリッジWebアウトプット
type BridgeWebOutput struct {
Players []*BridgeWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
DealerIdx int `json:"dealerIdx"`
TrumpSuit int `json:"trumpSuit"`
ContractLevel int `json:"contractLevel"`
ContractSuit int `json:"contractSuit"`
Doubled int `json:"doubled"`
DeclarerIdx int `json:"declarerIdx"`
DummyIdx int `json:"dummyIdx"`
BidHistory []*BridgeWebOutputBidEntry `json:"bidHistory"`
Vulnerability [2]bool `json:"vulnerability"`
CurrentTrick []*BridgeWebOutputTrickCard `json:"currentTrick"`
TeamScores [2]int `json:"teamScores"`
GamesWon [2]int `json:"gamesWon"`
BelowLine [2]int `json:"belowLine"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerTeam int `json:"winnerTeam"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
OpeningLeadDone bool `json:"openingLeadDone"`
DummyHand []*WebOutputCard `json:"dummyHand"`
Hint *BridgeWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config BridgeWebOutputConfig `json:"config"`
}## type BridgeWebOutputBidEntry
BridgeWebOutputBidEntry ビッド履歴エントリ
type BridgeWebOutputBidEntry struct {
PlayerIdx int `json:"playerIdx"`
BidType int `json:"bidType"`
Level int `json:"level"`
Suit int `json:"suit"`
}BridgeWebOutputConfig ブリッジ設定アウトプット
type BridgeWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
}BridgeWebOutputHint ヒント出力
type BridgeWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
BidType *int `json:"bidType,omitempty"`
BidLevel *int `json:"bidLevel,omitempty"`
BidSuit *int `json:"bidSuit,omitempty"`
Reason string `json:"reason"`
}BridgeWebOutputPlayer ブリッジWebアウトプットプレイヤー
type BridgeWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Team int `json:"team"`
TrickCount int `json:"trickCount"`
}## type BridgeWebOutputTrickCard
BridgeWebOutputTrickCard トリック中の1枚
type BridgeWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}CanastaCuiController カナスタCUIコントローラークラス
type CanastaCuiController struct {
// contains filtered or unexported fields
}### func NewCanastaCuiController
func NewCanastaCuiController(ci usecase.CanastaInteractorIF) *CanastaCuiControllerNewCanastaCuiController コンストラクタ
### func (*CanastaCuiController) Exec
func (c *CanastaCuiController) Exec(command string) stringExec コマンド実行
CanastaWebConfig カナスタWeb設定
type CanastaWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*CanastaWebConfig) ToConfig
func (c *CanastaWebConfig) ToConfig() domain.CanastaConfigToConfig builds a CanastaConfig from the nested web config, applying bounds checking.
CanastaWebController カナスタWebコントローラークラス
type CanastaWebController = GameWebController[usecase.CanastaInteractorIF, CanastaWebInput, *CanastaWebOutput]CanastaWebInput カナスタWebインプット
type CanastaWebInput struct {
BaseWebInput
CardIndex *int `json:"cardIndex,omitempty"`
NaturalPairIndices []int `json:"naturalPairIndices,omitempty"`
MeldGroups [][]int `json:"meldGroups,omitempty"`
Config *CanastaWebConfig `json:"config,omitempty"`
}### func (CanastaWebInput) ToConfig
func (p CanastaWebInput) ToConfig() domain.CanastaConfigToConfig builds a CanastaConfig from the web input.
CanastaWebOutput カナスタWebアウトプット
type CanastaWebOutput struct {
Players []*CanastaWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
DiscardTop *WebOutputCard `json:"discardTop"`
DrawPileCount int `json:"drawPileCount"`
DiscardPileCount int `json:"discardPileCount"`
IsFrozen bool `json:"isFrozen"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
WebOutputBase
Config CanastaWebOutputConfig `json:"config"`
}## type CanastaWebOutputConfig
CanastaWebOutputConfig カナスタ設定アウトプット
type CanastaWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}CanastaWebOutputMeld メルドのアウトプット
type CanastaWebOutputMeld struct {
Cards []*WebOutputCard `json:"cards"`
IsNatural bool `json:"isNatural"`
IsCanasta bool `json:"isCanasta"`
Rank int `json:"rank"`
}## type CanastaWebOutputPlayer
CanastaWebOutputPlayer カナスタWebアウトプットプレイヤー
type CanastaWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Melds []*CanastaWebOutputMeld `json:"melds"`
Red3Count int `json:"red3Count"`
Red3s []*WebOutputCard `json:"red3s"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
HasCanasta bool `json:"hasCanasta"`
HasInitMeld bool `json:"hasInitMeld"`
}## type ClockSolitaireCuiController
ClockSolitaireCuiController クロックソリティアCUIコントローラークラス
type ClockSolitaireCuiController struct {
// contains filtered or unexported fields
}### func NewClockSolitaireCuiController
func NewClockSolitaireCuiController(ci usecase.ClockSolitaireInteractorIF) *ClockSolitaireCuiControllerNewClockSolitaireCuiController コンストラクタ
### func (*ClockSolitaireCuiController) Exec
func (c *ClockSolitaireCuiController) Exec(command string) stringExec コマンド実行
## type ClockSolitaireWebController
ClockSolitaireWebController クロックソリティアWebコントローラークラス
type ClockSolitaireWebController = GameWebController[usecase.ClockSolitaireInteractorIF, ClockSolitaireWebInput, *ClockSolitaireWebOutput]## type ClockSolitaireWebInput
ClockSolitaireWebInput クロックソリティアWebインプット
type ClockSolitaireWebInput struct {
BaseWebInput
}## type ClockSolitaireWebOutput
ClockSolitaireWebOutput クロックソリティアWebアウトプット
type ClockSolitaireWebOutput struct {
Piles [][]*ClockSolitaireWebOutputCard `json:"piles"`
FaceUpCount []int `json:"faceUpCount"`
Phase int `json:"phase"`
StepCount int `json:"stepCount"`
CurrentCard *WebOutputCard `json:"currentCard,omitempty"`
WebOutputBase
}## type ClockSolitaireWebOutputCard
ClockSolitaireWebOutputCard パイルカード出力
type ClockSolitaireWebOutputCard struct {
Card *WebOutputCard `json:"card"`
FaceUp bool `json:"faceUp"`
}## type CrazyEightsCuiController
CrazyEightsCuiController クレイジーエイトCUIコントローラークラス
type CrazyEightsCuiController struct {
// contains filtered or unexported fields
}### func NewCrazyEightsCuiController
func NewCrazyEightsCuiController(ci usecase.CrazyEightsInteractorIF) *CrazyEightsCuiControllerNewCrazyEightsCuiController コンストラクタ
### func (*CrazyEightsCuiController) Exec
func (c *CrazyEightsCuiController) Exec(command string) stringExec コマンド実行
CrazyEightsWebConfig クレイジーエイトWeb設定
type CrazyEightsWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*CrazyEightsWebConfig) ToConfig
func (c *CrazyEightsWebConfig) ToConfig() domain.CrazyEightsConfigToConfig builds a CrazyEightsConfig from the nested web config, applying bounds checking.
## type CrazyEightsWebController
CrazyEightsWebController クレイジーエイトWebコントローラークラス
type CrazyEightsWebController = GameWebController[usecase.CrazyEightsInteractorIF, CrazyEightsWebInput, *CrazyEightsWebOutput]CrazyEightsWebInput クレイジーエイトWebインプット
type CrazyEightsWebInput struct {
BaseWebInput
CardIndex *int `json:"cardIndex,omitempty"`
Suit *int `json:"suit,omitempty"`
Config *CrazyEightsWebConfig `json:"config,omitempty"`
}### func (CrazyEightsWebInput) ToConfig
func (p CrazyEightsWebInput) ToConfig() domain.CrazyEightsConfigToConfig builds a CrazyEightsConfig from the web input.
CrazyEightsWebOutput クレイジーエイトWebアウトプット
type CrazyEightsWebOutput struct {
Players []*CrazyEightsWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
DiscardTop *WebOutputCard `json:"discardTop"`
DrawPileCount int `json:"drawPileCount"`
ChosenSuit int `json:"chosenSuit"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
WebOutputBase
Config CrazyEightsWebOutputConfig `json:"config"`
}## type CrazyEightsWebOutputConfig
CrazyEightsWebOutputConfig クレイジーエイト設定アウトプット
type CrazyEightsWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}## type CrazyEightsWebOutputPlayer
CrazyEightsWebOutputPlayer クレイジーエイトWebアウトプットプレイヤー
type CrazyEightsWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
}CribbageCuiController クリベッジCUIコントローラークラス
type CribbageCuiController struct {
// contains filtered or unexported fields
}### func NewCribbageCuiController
func NewCribbageCuiController(ci usecase.CribbageInteractorIF) *CribbageCuiControllerNewCribbageCuiController コンストラクタ
### func (*CribbageCuiController) Exec
func (c *CribbageCuiController) Exec(command string) stringExec コマンド実行
CribbageWebConfig クリベッジWeb設定
type CribbageWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*CribbageWebConfig) ToConfig
func (c *CribbageWebConfig) ToConfig() domain.CribbageConfigToConfig builds a CribbageConfig from the nested web config, applying bounds checking.
CribbageWebController クリベッジWebコントローラークラス
type CribbageWebController = GameWebController[usecase.CribbageInteractorIF, CribbageWebInput, *CribbageWebOutput]CribbageWebInput クリベッジWebインプット
type CribbageWebInput struct {
BaseWebInput
CardIndex *int `json:"cardIndex,omitempty"`
CardIndices []int `json:"cardIndices,omitempty"`
Config *CribbageWebConfig `json:"config,omitempty"`
}### func (CribbageWebInput) ToConfig
func (p CribbageWebInput) ToConfig() domain.CribbageConfigToConfig builds a CribbageConfig from the web input.
CribbageWebOutput クリベッジWebアウトプット
type CribbageWebOutput struct {
Players []*CribbageWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
DealerIdx int `json:"dealerIdx"`
Crib []*WebOutputCard `json:"crib"`
Starter *WebOutputCard `json:"starter"`
PegCount int `json:"pegCount"`
PegPlayedCards []*WebOutputCard `json:"pegPlayedCards"`
ShowPhaseStep int `json:"showPhaseStep"`
HandScoreDetails [3]*CribbageWebOutputScoreDetail `json:"handScoreDetails"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
WebOutputBase
Config CribbageWebOutputConfig `json:"config"`
}## type CribbageWebOutputConfig
CribbageWebOutputConfig クリベッジ設定アウトプット
type CribbageWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}## type CribbageWebOutputPlayer
CribbageWebOutputPlayer クリベッジWebアウトプットプレイヤー
type CribbageWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
}## type CribbageWebOutputScoreDetail
CribbageWebOutputScoreDetail スコア詳細のアウトプット
type CribbageWebOutputScoreDetail struct {
Fifteens int `json:"fifteens"`
Pairs int `json:"pairs"`
Runs int `json:"runs"`
Flush int `json:"flush"`
Nobs int `json:"nobs"`
Total int `json:"total"`
}DaifugoCuiController 大富豪CUIコントローラークラス
type DaifugoCuiController struct {
// contains filtered or unexported fields
}### func NewDaifugoCuiController
func NewDaifugoCuiController(dgi usecase.DaifugoInteractorIF) *DaifugoCuiControllerNewDaifugoCuiController コンストラクタ
### func (*DaifugoCuiController) Exec
func (c *DaifugoCuiController) Exec(command string) stringExec コマンド実行 play コマンドは “p 0 2” または “play 0 2” の形式でカードインデックスを指定。 インデックスなしの場合はパス扱い。例: “p” → パス / “p 0 2” → 0番と2番のカードを出す
DaifugoWebConfig ローカルルール設定 (入力・出力共用)
type DaifugoWebConfig struct {
JokerCount int `json:"jokerCount"`
EightCutEnabled bool `json:"eightCutEnabled"`
SuitLockMode int `json:"suitLockMode"`
ElevenBackEnabled bool `json:"elevenBackEnabled"`
SequenceEnabled bool `json:"sequenceEnabled"`
CardExchangeEnabled bool `json:"cardExchangeEnabled"`
BlindExchangeEnabled bool `json:"blindExchangeEnabled"`
FiveSkipEnabled bool `json:"fiveSkipEnabled"`
FiveSkipCount int `json:"fiveSkipCount"`
SevenPassEnabled bool `json:"sevenPassEnabled"`
TenDiscardEnabled bool `json:"tenDiscardEnabled"`
SpadeThreeEnabled bool `json:"spadeThreeEnabled"`
CapitalFallEnabled bool `json:"capitalFallEnabled"`
NineReverseEnabled bool `json:"nineReverseEnabled"`
CoupDetatEnabled bool `json:"coupDetatEnabled"`
NumberLockEnabled bool `json:"numberLockEnabled"`
SandstormEnabled bool `json:"sandstormEnabled"`
EmperorEnabled bool `json:"emperorEnabled"`
SequenceRevolutionEnabled bool `json:"sequenceRevolutionEnabled"`
SequenceLockEnabled bool `json:"sequenceLockEnabled"`
IllegalFinishEnabled bool `json:"illegalFinishEnabled"`
QueenBomberEnabled bool `json:"queenBomberEnabled"`
CpuDifficulty int `json:"cpuDifficulty"`
}### func (DaifugoWebConfig) ToConfig
func (c DaifugoWebConfig) ToConfig() domain.DaifugoConfigToConfig converts DaifugoWebConfig to domain.DaifugoConfig.
DaifugoWebController 大富豪Webコントローラークラス
type DaifugoWebController = GameWebController[usecase.DaifugoInteractorIF, DaifugoWebInput, *DaifugoWebOutput]DaifugoWebInput 大富豪Webインプット
type DaifugoWebInput struct {
BaseWebInput
Indices []int `json:"indices"` // 出すカードのインデックス。play コマンド用。空の場合はパス。
Config *DaifugoWebConfig `json:"config"` // リセット時のローカルルール設定 (省略可)
SortMode *int `json:"sortMode"` // ソートモード (sort コマンド用、省略可)
}DaifugoWebOutput 大富豪Webアウトプット
type DaifugoWebOutput struct {
Players []*DaifugoWebOutputPlayer `json:"players"`
CurrentTurn int `json:"currentTurn"`
TableCards []*WebOutputCard `json:"tableCards"`
LastPlayPlayerIdx int `json:"lastPlayPlayerIdx"`
GameEndFlag bool `json:"gameEndFlag"`
RevolutionActive bool `json:"revolutionActive"`
ElevenBackActive bool `json:"elevenBackActive"`
SuitLocked bool `json:"suitLocked"`
LockedSuit string `json:"lockedSuit"`
TableIsSequence bool `json:"tableIsSequence"`
Config DaifugoWebConfig `json:"config"`
ExchangeActions []*DaifugoWebOutputExchangeAction `json:"exchangeActions"`
CpuActions []*DaifugoWebOutputAction `json:"cpuActions"`
HumanAction *DaifugoWebOutputAction `json:"humanAction"`
PendingAction string `json:"pendingAction"` // "none"|"sevenPass"|"tenDiscard"|"queenBomber"
PendingActionTarget int `json:"pendingActionTarget"` // -1 if none
ReverseDirection bool `json:"reverseDirection"`
NumberLocked bool `json:"numberLocked"`
SequenceLocked bool `json:"sequenceLocked"`
SortMode int `json:"sortMode"`
WebOutputBase
}## type DaifugoWebOutputAction
DaifugoWebOutputAction 大富豪のプレイヤー行動記録
type DaifugoWebOutputAction struct {
PlayerIdx int `json:"playerIdx"`
PlayedCards []*WebOutputCard `json:"playedCards"` // nil = パス
}## type DaifugoWebOutputExchangeAction
DaifugoWebOutputExchangeAction カード交換記録
type DaifugoWebOutputExchangeAction struct {
FromPlayerIdx int `json:"fromPlayerIdx"`
ToPlayerIdx int `json:"toPlayerIdx"`
Cards []*WebOutputCard `json:"cards"`
}## type DaifugoWebOutputPlayer
DaifugoWebOutputPlayer 大富豪Webアウトプットプレイヤー
type DaifugoWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
IsFinished bool `json:"isFinished"`
Rank int `json:"rank"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
IllegalFinishPenalty bool `json:"illegalFinishPenalty"`
}DoubtCuiController ダウトCUIコントローラークラス
type DoubtCuiController struct {
// contains filtered or unexported fields
}### func NewDoubtCuiController
func NewDoubtCuiController(di usecase.DoubtInteractorIF) *DoubtCuiControllerNewDoubtCuiController コンストラクタ
### func (*DoubtCuiController) Exec
func (c *DoubtCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
p <値> <idx...> → カードを出す (値=宣言する値, idx=カードインデックス)
play <値> <idx...> (同上)
d <idx...> → ダウト (idx=ダウトするプレイヤーインデックス)
doubt <idx...> (同上)
s / skip → ダウトをスキップ
sw / setwindow → ダウト待機秒数設定 (1-60)
sm / setmemory → CPU記憶力設定 (0=Easy, 1=Normal, 2=Hard)
sp / setpenalty → ペナルティドロー上限設定 (0=無制限, >0=上限)
DoubtWebController ダウトWebコントローラークラス
type DoubtWebController = GameWebController[usecase.DoubtInteractorIF, DoubtWebInput, *DoubtWebOutput]DoubtWebInput ダウトWebインプット
type DoubtWebInput struct {
BaseWebInput
CardIndices []int `json:"cardIndices,omitempty"`
ClaimedValue int `json:"claimedValue,omitempty"`
DoubterIndices []int `json:"doubterIndices,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
DoubtWindowSec *int `json:"doubtWindowSec,omitempty"`
CpuMemoryLevel *int `json:"cpuMemoryLevel,omitempty"`
PenaltyDrawLimit *int `json:"penaltyDrawLimit,omitempty"`
CpuHesitationEnabled bool `json:"cpuHesitationEnabled,omitempty"`
CpuMetaAI bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (DoubtWebInput) ToConfig
func (p DoubtWebInput) ToConfig() domain.DoubtConfigToConfig builds a DoubtConfig from the web input.
DoubtWebOutput ダウトWebアウトプット
type DoubtWebOutput struct {
Players []*DoubtWebOutputPlayer `json:"players"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
TableCardCount int `json:"tableCardCount"`
LastAction *DoubtWebOutputAction `json:"lastAction"`
CpuDoubters []int `json:"cpuDoubters"`
CpuActions []*DoubtWebOutputAction `json:"cpuActions"`
HumanAction *DoubtWebOutputAction `json:"humanAction"`
LastDoubtResult *DoubtWebOutputDoubtResult `json:"lastDoubtResult"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
DoubtWindowSec int `json:"doubtWindowSec"`
PenaltyDrawLimit int `json:"penaltyDrawLimit"`
MetaAI *DoubtWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.DoubtHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}DoubtWebOutputAction ダウトのプレイヤー行動記録
type DoubtWebOutputAction struct {
PlayerIdx int `json:"playerIdx"`
ClaimedValue int `json:"claimedValue"`
CardCount int `json:"cardCount"`
IsBluff bool `json:"isBluff"`
HasTell bool `json:"hasTell"`
HesitationMs int `json:"hesitationMs,omitempty"`
}## type DoubtWebOutputDoubtResult
DoubtWebOutputDoubtResult ダウト解決結果
type DoubtWebOutputDoubtResult struct {
DoubterIdx int `json:"doubterIdx"`
CardPlayerIdx int `json:"cardPlayerIdx"`
WasLying bool `json:"wasLying"`
LoserIdx int `json:"loserIdx"`
CardCount int `json:"cardCount"`
DiscardedCount int `json:"discardedCount"`
RevealedCards []*WebOutputCard `json:"revealedCards"`
}DoubtWebOutputMetaAI メタAI情報
type DoubtWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
BluffRate float64 `json:"bluffRate"`
DoubtAccuracy float64 `json:"doubtAccuracy"`
HesitationMean float64 `json:"hesitationMean"`
}DoubtWebOutputPlayer ダウトWebアウトプットプレイヤー
type DoubtWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
IsFinished bool `json:"isFinished"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
}EuchreCuiController ユーカーCUIコントローラークラス
type EuchreCuiController struct {
// contains filtered or unexported fields
}### func NewEuchreCuiController
func NewEuchreCuiController(ei usecase.EuchreInteractorIF) *EuchreCuiControllerNewEuchreCuiController コンストラクタ
### func (*EuchreCuiController) Exec
func (c *EuchreCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
o / orderup → ピックアップ (オーダーアップ)
oa / orderupalone → ピックアップ (オーダーアップ + ゴーアローン)
pa / pass → パス (フェーズに応じて PickUp or PassCall)
c / call <suit> → スートをコール (1-4)
ca / callalone <suit> → スートをコール + ゴーアローン (1-4)
d / discard <i> → カードを捨てる
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ
sd / setdifficulty <0-2> → CPU難易度設定
sl / setlimit <n> → ポイント上限設定
h / hint → ヒント表示
log / l → 棋譜表示
EuchreWebConfig ユーカーWeb設定
type EuchreWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*EuchreWebConfig) ToConfig
func (c *EuchreWebConfig) ToConfig() domain.EuchreConfigToConfig builds an EuchreConfig from the nested web config, applying bounds checking.
EuchreWebController ユーカーWebコントローラークラス
type EuchreWebController = GameWebController[usecase.EuchreInteractorIF, EuchreWebInput, *EuchreWebOutput]EuchreWebInput ユーカーWebインプット
type EuchreWebInput struct {
BaseWebInput
OrderUp *bool `json:"orderUp,omitempty"`
GoAlone *bool `json:"goAlone,omitempty"`
Suit *int `json:"suit,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *EuchreWebConfig `json:"config,omitempty"`
}### func (EuchreWebInput) ToConfig
func (p EuchreWebInput) ToConfig() domain.EuchreConfigToConfig builds an EuchreConfig from the web input.
EuchreWebOutput ユーカーWebアウトプット
type EuchreWebOutput struct {
Players []*EuchreWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
DealerIdx int `json:"dealerIdx"`
TrumpSuit int `json:"trumpSuit"`
FaceUpCard *WebOutputCard `json:"faceUpCard"`
MakerTeam int `json:"makerTeam"`
GoingAlone bool `json:"goingAlone"`
GoingAlonePlayerIdx int `json:"goingAlonePlayerIdx"`
CurrentTrick []*EuchreWebOutputTrickCard `json:"currentTrick"`
TeamScores [2]int `json:"teamScores"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerTeam int `json:"winnerTeam"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
Hint *EuchreWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config EuchreWebOutputConfig `json:"config"`
}EuchreWebOutputConfig ユーカー設定アウトプット
type EuchreWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}EuchreWebOutputHint ヒント出力
type EuchreWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
OrderUp *bool `json:"orderUp,omitempty"`
Suit *int `json:"suit,omitempty"`
GoAlone *bool `json:"goAlone,omitempty"`
Reason string `json:"reason"`
}EuchreWebOutputPlayer ユーカーWebアウトプットプレイヤー
type EuchreWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Team int `json:"team"`
TrickCount int `json:"trickCount"`
}## type EuchreWebOutputTrickCard
EuchreWebOutputTrickCard トリック中の1枚
type EuchreWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}FreeCellCuiController フリーセルCUIコントローラークラス
type FreeCellCuiController struct {
// contains filtered or unexported fields
}### func NewFreeCellCuiController
func NewFreeCellCuiController(fi usecase.FreeCellInteractorIF) *FreeCellCuiControllerNewFreeCellCuiController コンストラクタ
### func (*FreeCellCuiController) Exec
func (c *FreeCellCuiController) Exec(command string) stringExec コマンド実行
FreeCellWebController フリーセルWebコントローラークラス
type FreeCellWebController = GameWebController[usecase.FreeCellInteractorIF, FreeCellWebInput, *FreeCellWebOutput]FreeCellWebInput フリーセルWebインプット
type FreeCellWebInput struct {
BaseWebInput
From *FreeCellWebZone `json:"from,omitempty"`
To *FreeCellWebZone `json:"to,omitempty"`
}FreeCellWebOutput フリーセルWebアウトプット
type FreeCellWebOutput struct {
Tableau [][]*WebOutputCard `json:"tableau"`
FreeCells []*WebOutputCard `json:"freeCells"`
Foundation [][]*WebOutputCard `json:"foundation"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Hint *FreeCellWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}FreeCellWebOutputHint ヒント出力
type FreeCellWebOutputHint struct {
FromZone string `json:"fromZone"`
FromCol int `json:"fromCol"`
CardIndex int `json:"cardIndex"`
ToZone string `json:"toZone"`
ToCol int `json:"toCol"`
}FreeCellWebZone ゾーン指定
type FreeCellWebZone struct {
Zone string `json:"zone"`
Col *int `json:"col,omitempty"`
Cell *int `json:"cell,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
}GameWebController is a generic web controller that eliminates boilerplate shared across all game-specific web controllers. Each game provides its own factory, default-output builder, and command dispatcher.
type GameWebController[I any, P WebInput, O any] struct {
// contains filtered or unexported fields
}func NewGameWebController[I any, P WebInput, O any](factory func() I, newDefault func(string) O, dispatch func(bc *baseController, w http.ResponseWriter, interactor I, param P, newDefault func(string) O) bool) *GameWebController[I, P, O]NewGameWebController creates a GameWebController with the default in-memory session provider.
### func NewGameWebControllerWithProvider
func NewGameWebControllerWithProvider[I any, P WebInput, O any](provider SessionProvider[I], factory func() I, newDefault func(string) O, dispatch func(bc *baseController, w http.ResponseWriter, interactor I, param P, newDefault func(string) O) bool) *GameWebController[I, P, O]NewGameWebControllerWithProvider creates a GameWebController with an explicit SessionProvider (e.g. KV-backed for Workers).
### func (*GameWebController[I, P, O]) Exec
func (gwc *GameWebController[I, P, O]) Exec(w http.ResponseWriter, r *http.Request)Exec handles an incoming game request.
### func (*GameWebController[I, P, O]) Stop
func (gwc *GameWebController[I, P, O]) Stop()Stop stops the background cleanup goroutine of the session provider.
GinRummyCuiController ジンラミーCUIコントローラークラス
type GinRummyCuiController struct {
// contains filtered or unexported fields
}### func NewGinRummyCuiController
func NewGinRummyCuiController(ci usecase.GinRummyInteractorIF) *GinRummyCuiControllerNewGinRummyCuiController コンストラクタ
### func (*GinRummyCuiController) Exec
func (c *GinRummyCuiController) Exec(command string) stringExec コマンド実行
GinRummyWebConfig ジンラミーWeb設定
type GinRummyWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*GinRummyWebConfig) ToConfig
func (c *GinRummyWebConfig) ToConfig() domain.GinRummyConfigToConfig builds a GinRummyConfig from the nested web config, applying bounds checking.
GinRummyWebController ジンラミーWebコントローラークラス
type GinRummyWebController = GameWebController[usecase.GinRummyInteractorIF, GinRummyWebInput, *GinRummyWebOutput]GinRummyWebInput ジンラミーWebインプット
type GinRummyWebInput struct {
BaseWebInput
CardIndex *int `json:"cardIndex,omitempty"`
CardIndices []int `json:"cardIndices,omitempty"`
Config *GinRummyWebConfig `json:"config,omitempty"`
}### func (GinRummyWebInput) ToConfig
func (p GinRummyWebInput) ToConfig() domain.GinRummyConfigToConfig builds a GinRummyConfig from the web input.
GinRummyWebOutput ジンラミーWebアウトプット
type GinRummyWebOutput struct {
Players []*GinRummyWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
DiscardTop *WebOutputCard `json:"discardTop"`
DrawPileCount int `json:"drawPileCount"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
KnockerIdx int `json:"knockerIdx"`
KnockerMelds []*GinRummyWebOutputMeld `json:"knockerMelds"`
KnockerDeadwood []*WebOutputCard `json:"knockerDeadwood"`
IsGin bool `json:"isGin"`
WebOutputBase
Config GinRummyWebOutputConfig `json:"config"`
}## type GinRummyWebOutputConfig
GinRummyWebOutputConfig ジンラミー設定アウトプット
type GinRummyWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}GinRummyWebOutputMeld メルドのアウトプット
type GinRummyWebOutputMeld struct {
Cards []*WebOutputCard `json:"cards"`
}## type GinRummyWebOutputPlayer
GinRummyWebOutputPlayer ジンラミーWebアウトプットプレイヤー
type GinRummyWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
}GoFishCuiController Go FishCUIコントローラークラス
type GoFishCuiController struct {
// contains filtered or unexported fields
}### func NewGoFishCuiController
func NewGoFishCuiController(gi usecase.GoFishInteractorIF) *GoFishCuiControllerNewGoFishCuiController コンストラクタ
### func (*GoFishCuiController) Exec
func (c *GoFishCuiController) Exec(command string) stringExec コマンド実行 ask コマンドは “ask <targetIdx> <rank>” の形式。 sd コマンドで CPU 難易度を変更 (0=Easy, 1=Normal, 2=Hard)。
GoFishWebController Go FishWebコントローラークラス
type GoFishWebController = GameWebController[usecase.GoFishInteractorIF, GoFishWebInput, *GoFishWebOutput]GoFishWebInput Go FishWebインプット
type GoFishWebInput struct {
BaseWebInput
TargetIdx *int `json:"targetIdx,omitempty"`
Rank *int `json:"rank,omitempty"`
Config *GoFishWebInputConfig `json:"config,omitempty"`
}GoFishWebInputConfig Go Fish設定インプット
type GoFishWebInputConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
}GoFishWebOutput Go FishWebアウトプット
type GoFishWebOutput struct {
Players []*GoFishWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
CurrentTurn int `json:"currentTurn"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
TurnNumber int `json:"turnNumber"`
DeckRemaining int `json:"deckRemaining"`
LastAsk *GoFishWebOutputLastAsk `json:"lastAsk,omitempty"`
CpuActions []*GoFishWebOutputCpuAction `json:"cpuActions,omitempty"`
HumanAction *GoFishWebOutputCpuAction `json:"humanAction,omitempty"`
WebOutputBase
Config GoFishWebOutputConfig `json:"config"`
}GoFishWebOutputBook Go FishWebアウトプットブック
type GoFishWebOutputBook struct {
Rank int `json:"rank"`
Cards []*WebOutputCard `json:"cards"`
}GoFishWebOutputConfig Go Fish設定アウトプット
type GoFishWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
}## type GoFishWebOutputCpuAction
GoFishWebOutputCpuAction CPUの行動記録
type GoFishWebOutputCpuAction struct {
AskPlayerIdx int `json:"askPlayerIdx"`
AskTargetIdx int `json:"askTargetIdx"`
AskRank int `json:"askRank"`
Success bool `json:"success"`
CardsReceived int `json:"cardsReceived"`
DrawnCard *WebOutputCard `json:"drawnCard,omitempty"`
BookFormed bool `json:"bookFormed"`
BookRank int `json:"bookRank,omitempty"`
}## type GoFishWebOutputLastAsk
GoFishWebOutputLastAsk 最後の要求情報
type GoFishWebOutputLastAsk struct {
PlayerIdx int `json:"playerIdx"`
TargetIdx int `json:"targetIdx"`
Rank int `json:"rank"`
Success bool `json:"success"`
CardsReceived []*WebOutputCard `json:"cardsReceived,omitempty"`
DrawnCard *WebOutputCard `json:"drawnCard,omitempty"`
BookFormed bool `json:"bookFormed"`
BookRank int `json:"bookRank,omitempty"`
}GoFishWebOutputPlayer Go FishWebアウトプットプレイヤー
type GoFishWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
BookCount int `json:"bookCount"`
Books []*GoFishWebOutputBook `json:"books"`
}GolfCuiController ゴルフソリティアCUIコントローラークラス
type GolfCuiController struct {
// contains filtered or unexported fields
}func NewGolfCuiController(gi usecase.GolfInteractorIF) *GolfCuiControllerNewGolfCuiController コンストラクタ
### func (*GolfCuiController) Exec
func (c *GolfCuiController) Exec(command string) stringExec コマンド実行
GolfWebController ゴルフソリティアWebコントローラークラス
type GolfWebController = GameWebController[usecase.GolfInteractorIF, GolfWebInput, *GolfWebOutput]GolfWebInput ゴルフソリティアWebインプット
type GolfWebInput struct {
BaseWebInput
Col *int `json:"col,omitempty"`
}GolfWebOutput ゴルフソリティアWebアウトプット
type GolfWebOutput struct {
Layout [][]*GolfWebOutputCard `json:"layout"`
StockCount int `json:"stockCount"`
Waste []*WebOutputCard `json:"waste"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Hint *GolfWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}GolfWebOutputCard タブローカード出力
type GolfWebOutputCard struct {
Card *WebOutputCard `json:"card"`
Removed bool `json:"removed"`
Exposed bool `json:"exposed"`
}GolfWebOutputHint ヒント出力
type GolfWebOutputHint struct {
Type string `json:"type"`
Col int `json:"col"`
}HeartsCuiController ハーツCUIコントローラークラス
type HeartsCuiController struct {
// contains filtered or unexported fields
}### func NewHeartsCuiController
func NewHeartsCuiController(hi usecase.HeartsInteractorIF) *HeartsCuiControllerNewHeartsCuiController コンストラクタ
### func (*HeartsCuiController) Exec
func (c *HeartsCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
pass <i1> <i2> <i3> → カード3枚を交換
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ (スコアリング)
sd / setdifficulty <0-2> → CPU難易度設定
sl / setlimit <n> → ポイント上限設定
h / hint → ヒント表示
log / l → 棋譜表示
HeartsWebConfig ハーツWeb設定
type HeartsWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
OmnibusJD *bool `json:"omnibusJD,omitempty"`
}### func (*HeartsWebConfig) ToConfig
func (c *HeartsWebConfig) ToConfig() domain.HeartsConfigToConfig builds a HeartsConfig from the nested web config, applying bounds checking.
HeartsWebController ハーツWebコントローラークラス
type HeartsWebController = GameWebController[usecase.HeartsInteractorIF, HeartsWebInput, *HeartsWebOutput]HeartsWebInput ハーツWebインプット
type HeartsWebInput struct {
BaseWebInput
CardIndices []int `json:"cardIndices,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *HeartsWebConfig `json:"config,omitempty"`
}### func (HeartsWebInput) ToConfig
func (p HeartsWebInput) ToConfig() domain.HeartsConfigToConfig builds a HeartsConfig from the web input.
HeartsWebOutput ハーツWebアウトプット
type HeartsWebOutput struct {
Players []*HeartsWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
CurrentTrick []*HeartsWebOutputTrickCard `json:"currentTrick"`
HeartsBroken bool `json:"heartsBroken"`
PassDirection int `json:"passDirection"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
Hint *HeartsWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config HeartsWebOutputConfig `json:"config"`
}HeartsWebOutputConfig ハーツ設定アウトプット
type HeartsWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
OmnibusJD bool `json:"omnibusJD"`
}HeartsWebOutputHint ヒント出力
type HeartsWebOutputHint struct {
CardIndices []int `json:"cardIndices"`
Reason string `json:"reason"`
}HeartsWebOutputPlayer ハーツWebアウトプットプレイヤー
type HeartsWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
TrickCount int `json:"trickCount"`
}## type HeartsWebOutputTrickCard
HeartsWebOutputTrickCard トリック中の1枚
type HeartsWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}HoldemCuiController テキサスホールデムCUIコントローラークラス
type HoldemCuiController struct {
// contains filtered or unexported fields
}### func NewHoldemCuiController
func NewHoldemCuiController(hi usecase.HoldemInteractorIF) *HoldemCuiControllerNewHoldemCuiController コンストラクタ
### func (*HoldemCuiController) Exec
func (c *HoldemCuiController) Exec(command string) stringExec コマンド実行
HoldemWebController テキサスホールデムWebコントローラークラス
type HoldemWebController = GameWebController[usecase.HoldemInteractorIF, HoldemWebInput, *HoldemWebOutput]HoldemWebInput テキサスホールデムWebインプット
type HoldemWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
SmallBlind *int `json:"smallBlind,omitempty"`
BigBlind *int `json:"bigBlind,omitempty"`
TournamentMode *bool `json:"tournamentMode,omitempty"`
BlindLevelHands *int `json:"blindLevelHands,omitempty"`
BlindMultiplier *int `json:"blindMultiplier,omitempty"`
BettingLimit *int `json:"bettingLimit,omitempty"`
TableSize *int `json:"tableSize,omitempty"`
RebuyEnabled *bool `json:"rebuyEnabled,omitempty"`
RebuyMaxCount *int `json:"rebuyMaxCount,omitempty"`
RebuyChips *int `json:"rebuyChips,omitempty"`
RebuyPeriodHands *int `json:"rebuyPeriodHands,omitempty"`
AddonEnabled *bool `json:"addonEnabled,omitempty"`
AddonChips *int `json:"addonChips,omitempty"`
AddonAfterHand *int `json:"addonAfterHand,omitempty"`
CpuMetaAI bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (HoldemWebInput) ToConfig
func (p HoldemWebInput) ToConfig() (domain.HoldemConfig, error)ToConfig builds a HoldemConfig from the web input. Returns an error if the blind configuration is invalid or tableSize is invalid.
HoldemWebOutput テキサスホールデムWebアウトプット
type HoldemWebOutput struct {
Players []*HoldemWebOutputPlayer `json:"players"`
CommunityCards []*WebOutputCard `json:"communityCards"`
Pot int `json:"pot"`
SidePots []*HoldemWebOutputSidePot `json:"sidePots"`
DealerIdx int `json:"dealerIdx"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
LastBet int `json:"lastBet"`
MinRaise int `json:"minRaise"`
BettingLimit int `json:"bettingLimit"`
RaiseCount int `json:"raiseCount"`
MaxBetAmount int `json:"maxBetAmount"`
RoundResults []*HoldemWebOutputResult `json:"roundResults"`
CpuActions []*HoldemWebOutputCpuAction `json:"cpuActions"`
HandCount int `json:"handCount"`
SmallBlind int `json:"smallBlind"`
BigBlind int `json:"bigBlind"`
TournamentMode bool `json:"tournamentMode"`
BlindLevelHands int `json:"blindLevelHands"`
BlindMultiplier int `json:"blindMultiplier"`
TableSize int `json:"tableSize"`
RebuyAvailable bool `json:"rebuyAvailable"`
AddonAvailable bool `json:"addonAvailable"`
RebuyCounts []int `json:"rebuyCounts"`
AddonUsed []bool `json:"addonUsed"`
RebuyEnabled bool `json:"rebuyEnabled"`
AddonEnabled bool `json:"addonEnabled"`
RebuyMaxCount int `json:"rebuyMaxCount"`
RebuyChips int `json:"rebuyChips"`
AddonChips int `json:"addonChips"`
RebuyPeriodHands int `json:"rebuyPeriodHands"`
AddonAfterHand int `json:"addonAfterHand"`
RebuyPhaseType int `json:"rebuyPhaseType"`
MuckAvailable bool `json:"muckAvailable"`
Equity *HoldemWebOutputEquity `json:"equity,omitempty"`
PotOdds *float64 `json:"potOdds,omitempty"`
MetaAI *HoldemWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.BettingHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}## type HoldemWebOutputCpuAction
HoldemWebOutputCpuAction テキサスホールデムCPU行動記録
type HoldemWebOutputCpuAction struct {
PlayerIdx int `json:"playerIdx"`
Action int `json:"action"`
Amount int `json:"amount"`
}HoldemWebOutputEquity テキサスホールデムエクイティ情報
type HoldemWebOutputEquity struct {
WinProbability float64 `json:"winProbability"`
HandOdds []*HoldemWebOutputHandOdds `json:"handOdds"`
}## type HoldemWebOutputHandOdds
HoldemWebOutputHandOdds テキサスホールデムハンドオッズ
type HoldemWebOutputHandOdds struct {
HandRank int `json:"handRank"`
HandName string `json:"handName"`
Probability float64 `json:"probability"`
}HoldemWebOutputMetaAI メタAI情報
type HoldemWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
BluffRate float64 `json:"bluffRate"`
FoldRate float64 `json:"foldRate"`
HesitationMean float64 `json:"hesitationMean"`
}HoldemWebOutputPlayer テキサスホールデムWebアウトプットプレイヤー
type HoldemWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
Cards []*WebOutputCard `json:"cards"`
Chips int `json:"chips"`
CurrentBet int `json:"currentBet"`
Folded bool `json:"folded"`
AllIn bool `json:"allIn"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
BestHand []*WebOutputCard `json:"bestHand"`
PlayStyleName string `json:"playStyleName"`
TotalHands int `json:"totalHands"`
VPIP int `json:"vpip"`
PFR int `json:"pfr"`
ThreeBet int `json:"threeBet"`
AF string `json:"af"`
}HoldemWebOutputResult テキサスホールデムショーダウン結果
type HoldemWebOutputResult struct {
PlayerIdx int `json:"playerIdx"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
Kickers string `json:"kickers"`
BestHand []*WebOutputCard `json:"bestHand"`
WonAmount int `json:"wonAmount"`
Mucked bool `json:"mucked"`
}## type HoldemWebOutputSidePot
HoldemWebOutputSidePot テキサスホールデムサイドポット
type HoldemWebOutputSidePot struct {
Amount int `json:"amount"`
EligiblePlayers []int `json:"eligiblePlayers"`
}## type IndianPokerCuiController
IndianPokerCuiController インディアンポーカーCUIコントローラークラス
type IndianPokerCuiController struct {
// contains filtered or unexported fields
}### func NewIndianPokerCuiController
func NewIndianPokerCuiController(ipi usecase.IndianPokerInteractorIF) *IndianPokerCuiControllerNewIndianPokerCuiController コンストラクタ
### func (*IndianPokerCuiController) Exec
func (c *IndianPokerCuiController) Exec(command string) stringExec コマンド実行
## type IndianPokerWebController
IndianPokerWebController インディアンポーカーWebコントローラークラス
type IndianPokerWebController = GameWebController[usecase.IndianPokerInteractorIF, IndianPokerWebInput, *IndianPokerWebOutput]IndianPokerWebInput インディアンポーカーWebインプット
type IndianPokerWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
Ante *int `json:"ante,omitempty"`
BettingLimit *int `json:"bettingLimit,omitempty"`
CpuMetaAI *bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (IndianPokerWebInput) ToConfig
func (p IndianPokerWebInput) ToConfig() domain.IndianPokerConfigToConfig builds an IndianPokerConfig from the web input.
IndianPokerWebOutput インディアンポーカーWebアウトプット
type IndianPokerWebOutput struct {
Players []*IndianPokerWebOutputPlayer `json:"players"`
Pot int `json:"pot"`
SidePots []*IndianPokerWebOutputSidePot `json:"sidePots"`
DealerIdx int `json:"dealerIdx"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
LastBet int `json:"lastBet"`
MinRaise int `json:"minRaise"`
BettingLimit int `json:"bettingLimit"`
RaiseCount int `json:"raiseCount"`
MaxBetAmount int `json:"maxBetAmount"`
RoundResults []*IndianPokerWebOutputResult `json:"roundResults"`
CpuActions []*IndianPokerWebOutputCpuAction `json:"cpuActions"`
HandCount int `json:"handCount"`
Ante int `json:"ante"`
MetaAI *IndianPokerWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.IndianPokerHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}## type IndianPokerWebOutputCpuAction
IndianPokerWebOutputCpuAction インディアンポーカーCPU行動記録
type IndianPokerWebOutputCpuAction struct {
PlayerIdx int `json:"playerIdx"`
Action int `json:"action"`
Amount int `json:"amount"`
}## type IndianPokerWebOutputMetaAI
IndianPokerWebOutputMetaAI メタAI情報
type IndianPokerWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
BluffRate float64 `json:"bluffRate"`
FoldRate float64 `json:"foldRate"`
HesitationMean float64 `json:"hesitationMean"`
}## type IndianPokerWebOutputPlayer
IndianPokerWebOutputPlayer インディアンポーカーWebアウトプットプレイヤー
type IndianPokerWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
Card *WebOutputCard `json:"card"`
Chips int `json:"chips"`
CurrentBet int `json:"currentBet"`
Folded bool `json:"folded"`
AllIn bool `json:"allIn"`
PlayStyleName string `json:"playStyleName"`
}## type IndianPokerWebOutputResult
IndianPokerWebOutputResult インディアンポーカーショーダウン結果
type IndianPokerWebOutputResult struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
CardRank int `json:"cardRank"`
WonAmount int `json:"wonAmount"`
}## type IndianPokerWebOutputSidePot
IndianPokerWebOutputSidePot インディアンポーカーサイドポット
type IndianPokerWebOutputSidePot struct {
Amount int `json:"amount"`
EligiblePlayers []int `json:"eligiblePlayers"`
}KlondikeCuiController クロンダイクCUIコントローラークラス
type KlondikeCuiController struct {
// contains filtered or unexported fields
}### func NewKlondikeCuiController
func NewKlondikeCuiController(ki usecase.KlondikeInteractorIF) *KlondikeCuiControllerNewKlondikeCuiController コンストラクタ
### func (*KlondikeCuiController) Exec
func (c *KlondikeCuiController) Exec(command string) stringExec コマンド実行
KlondikeWebConfig 設定
type KlondikeWebConfig struct {
DrawCount *int `json:"drawCount,omitempty"`
ScoringMode *int `json:"scoringMode,omitempty"`
}KlondikeWebController クロンダイクWebコントローラークラス
type KlondikeWebController = GameWebController[usecase.KlondikeInteractorIF, KlondikeWebInput, *KlondikeWebOutput]KlondikeWebInput クロンダイクWebインプット
type KlondikeWebInput struct {
BaseWebInput
From *KlondikeWebZone `json:"from,omitempty"`
To *KlondikeWebZone `json:"to,omitempty"`
Config *KlondikeWebConfig `json:"config,omitempty"`
}KlondikeWebOutput クロンダイクWebアウトプット
type KlondikeWebOutput struct {
Tableau [][]*KlondikeWebOutputTableauCard `json:"tableau"`
StockCount int `json:"stockCount"`
Waste []*WebOutputCard `json:"waste"`
Foundation [][]*WebOutputCard `json:"foundation"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
DrawCount int `json:"drawCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Score int `json:"score"`
ScoringMode int `json:"scoringMode"`
Hint *KlondikeWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}KlondikeWebOutputHint ヒント出力
type KlondikeWebOutputHint struct {
FromZone string `json:"fromZone"`
FromCol int `json:"fromCol"`
CardIndex int `json:"cardIndex"`
ToZone string `json:"toZone"`
ToCol int `json:"toCol"`
}## type KlondikeWebOutputTableauCard
KlondikeWebOutputTableauCard タブローカード出力
type KlondikeWebOutputTableauCard struct {
Card *WebOutputCard `json:"card"`
FaceUp bool `json:"faceUp"`
}KlondikeWebZone ゾーン指定
type KlondikeWebZone struct {
Zone string `json:"zone"`
Col *int `json:"col,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
}MemoryCuiController 神経衰弱CUIコントローラークラス
type MemoryCuiController struct {
// contains filtered or unexported fields
}### func NewMemoryCuiController
func NewMemoryCuiController(mi usecase.MemoryInteractorIF) *MemoryCuiControllerNewMemoryCuiController コンストラクタ
### func (*MemoryCuiController) Exec
func (c *MemoryCuiController) Exec(command string) stringExec コマンド実行
MemorySessionProvider wraps SessionStore to satisfy SessionProvider.
type MemorySessionProvider[T any] struct {
// contains filtered or unexported fields
}### func NewMemorySessionProvider
func NewMemorySessionProvider[T any]() *MemorySessionProvider[T]NewMemorySessionProvider creates a MemorySessionProvider backed by an in-memory SessionStore with background TTL eviction.
### func (*MemorySessionProvider[T]) Acquire
func (m *MemorySessionProvider[T]) Acquire(id string, factory func() T) (T, SessionRelease, bool)Acquire retrieves (or creates) the session value and locks the per-session mutex. The returned release function unlocks it.
### func (*MemorySessionProvider[T]) Stop
func (m *MemorySessionProvider[T]) Stop()Stop shuts down the background cleanup goroutine.
### func (*MemorySessionProvider[T]) Store
func (m *MemorySessionProvider[T]) Store() *SessionStore[T]Store returns the underlying SessionStore for testing/inspection.
MemoryWebConfig 神経衰弱Web設定
type MemoryWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
}### func (*MemoryWebConfig) ToConfig
func (c *MemoryWebConfig) ToConfig() domain.MemoryConfigToConfig builds a MemoryConfig from the nested web config, applying bounds checking.
MemoryWebController 神経衰弱Webコントローラークラス
type MemoryWebController = GameWebController[usecase.MemoryInteractorIF, MemoryWebInput, *MemoryWebOutput]MemoryWebInput 神経衰弱Webインプット
type MemoryWebInput struct {
BaseWebInput
Position *int `json:"position,omitempty"`
Config *MemoryWebConfig `json:"config,omitempty"`
}### func (MemoryWebInput) ToConfig
func (p MemoryWebInput) ToConfig() domain.MemoryConfigToConfig builds a MemoryConfig from the web input.
MemoryWebOutput 神経衰弱Webアウトプット
type MemoryWebOutput struct {
Players []*MemoryWebOutputPlayer `json:"players"`
Board []*MemoryWebOutputBoardCard `json:"board"`
Phase int `json:"phase"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
FirstFlipPos int `json:"firstFlipPos"`
SecondFlipPos int `json:"secondFlipPos"`
LastMatchResult bool `json:"lastMatchResult"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
TurnNumber int `json:"turnNumber"`
WebOutputBase
Config MemoryWebOutputConfig `json:"config"`
}## type MemoryWebOutputBoardCard
MemoryWebOutputBoardCard 神経衰弱Webアウトプットボードカード
type MemoryWebOutputBoardCard struct {
Card *WebOutputCard `json:"card"`
FaceUp bool `json:"faceUp"`
Taken bool `json:"taken"`
}MemoryWebOutputConfig 神経衰弱設定アウトプット
type MemoryWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
}MemoryWebOutputPlayer 神経衰弱Webアウトプットプレイヤー
type MemoryWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
PairCount int `json:"pairCount"`
}NapoleonCuiController ナポレオンCUIコントローラークラス
type NapoleonCuiController struct {
// contains filtered or unexported fields
}### func NewNapoleonCuiController
func NewNapoleonCuiController(ni usecase.NapoleonInteractorIF) *NapoleonCuiControllerNewNapoleonCuiController コンストラクタ
### func (*NapoleonCuiController) Exec
func (c *NapoleonCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
b / bid <n> → ビッドを宣言 (0=パス)
t / trump <suit> <adjSuit> <adjVal> → 切り札と副官を宣言
e / exchange <i> → 場札交換 (捨てるカードインデックス)
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ (スコアリング)
sd / setdifficulty <0-2> → CPU難易度設定
sl / setlimit <n> → ポイント上限設定
sm / setminbid <n> → 最低ビッド設定
h / hint → ヒント表示
log / l → 棋譜表示
NapoleonWebConfig ナポレオンWeb設定
type NapoleonWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
MinBid *int `json:"minBid,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*NapoleonWebConfig) ToConfig
func (c *NapoleonWebConfig) ToConfig() domain.NapoleonConfigToConfig builds a NapoleonConfig from the nested web config, applying bounds checking.
NapoleonWebController ナポレオンWebコントローラークラス
type NapoleonWebController = GameWebController[usecase.NapoleonInteractorIF, NapoleonWebInput, *NapoleonWebOutput]NapoleonWebInput ナポレオンWebインプット
type NapoleonWebInput struct {
BaseWebInput
Bid *int `json:"bid,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
TrumpSuit *int `json:"trumpSuit,omitempty"`
AdjutantSuit *int `json:"adjutantSuit,omitempty"`
AdjutantValue *int `json:"adjutantValue,omitempty"`
DiscardIndex *int `json:"discardIndex,omitempty"`
Config *NapoleonWebConfig `json:"config,omitempty"`
}### func (NapoleonWebInput) ToConfig
func (p NapoleonWebInput) ToConfig() domain.NapoleonConfigToConfig builds a NapoleonConfig from the web input.
NapoleonWebOutput ナポレオンWebアウトプット
type NapoleonWebOutput struct {
Players []*NapoleonWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
CurrentTrick []*NapoleonWebOutputTrickCard `json:"currentTrick"`
TrumpSuit int `json:"trumpSuit"`
AdjutantCard *WebOutputCard `json:"adjutantCard,omitempty"`
NapoleonIdx int `json:"napoleonIdx"`
AdjutantIdx int `json:"adjutantIdx"`
AdjutantRevealed bool `json:"adjutantRevealed"`
HighestBid int `json:"highestBid"`
HighestBidder int `json:"highestBidder"`
Kitty []*WebOutputCard `json:"kitty,omitempty"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerTeam int `json:"winnerTeam"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
Hint *NapoleonWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config NapoleonWebOutputConfig `json:"config"`
}## type NapoleonWebOutputConfig
NapoleonWebOutputConfig ナポレオン設定アウトプット
type NapoleonWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
MinBid int `json:"minBid"`
PointLimit int `json:"pointLimit"`
}NapoleonWebOutputHint ヒント出力
type NapoleonWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
Bid *int `json:"bid,omitempty"`
TrumpSuit *int `json:"trumpSuit,omitempty"`
AdjutantSuit *int `json:"adjutantSuit,omitempty"`
AdjutantValue *int `json:"adjutantValue,omitempty"`
DiscardIndex *int `json:"discardIndex,omitempty"`
Reason string `json:"reason"`
}## type NapoleonWebOutputPlayer
NapoleonWebOutputPlayer ナポレオンWebアウトプットプレイヤー
type NapoleonWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Bid int `json:"bid"`
IsNapoleon bool `json:"isNapoleon"`
IsAdjutant bool `json:"isAdjutant"`
AdjutantRevealed bool `json:"adjutantRevealed"`
PictureCards int `json:"pictureCards"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
TrickCount int `json:"trickCount"`
}## type NapoleonWebOutputTrickCard
NapoleonWebOutputTrickCard トリック中の1枚
type NapoleonWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}OhHellCuiController オー・ヘルCUIコントローラークラス
type OhHellCuiController struct {
// contains filtered or unexported fields
}### func NewOhHellCuiController
func NewOhHellCuiController(oi usecase.OhHellInteractorIF) *OhHellCuiControllerNewOhHellCuiController コンストラクタ
### func (*OhHellCuiController) Exec
func (c *OhHellCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
b / bid <n> → ビッドを宣言
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ (スコアリング)
sd / setdifficulty <0-2> → CPU難易度設定
sm / setmaxhand <n> → 最大手札枚数設定
h / hint → ヒント表示
log / l → 棋譜表示
OhHellWebConfig オー・ヘルWeb設定
type OhHellWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
MaxHandSize *int `json:"maxHandSize,omitempty"`
ScoringVariant *int `json:"scoringVariant,omitempty"`
RoundDirection *int `json:"roundDirection,omitempty"`
}### func (*OhHellWebConfig) ToConfig
func (c *OhHellWebConfig) ToConfig() domain.OhHellConfigToConfig builds an OhHellConfig from the nested web config, applying bounds checking.
OhHellWebController オー・ヘルWebコントローラークラス
type OhHellWebController = GameWebController[usecase.OhHellInteractorIF, OhHellWebInput, *OhHellWebOutput]OhHellWebInput オー・ヘルWebインプット
type OhHellWebInput struct {
BaseWebInput
Bid *int `json:"bid,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *OhHellWebConfig `json:"config,omitempty"`
}### func (OhHellWebInput) ToConfig
func (p OhHellWebInput) ToConfig() domain.OhHellConfigToConfig builds an OhHellConfig from the web input.
OhHellWebOutput オー・ヘルWebアウトプット
type OhHellWebOutput struct {
Players []*OhHellWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TotalRounds int `json:"totalRounds"`
HandSize int `json:"handSize"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
DealerIdx int `json:"dealerIdx"`
TrumpCard *WebOutputCard `json:"trumpCard"`
TrumpSuit int `json:"trumpSuit"`
RestrictedBid int `json:"restrictedBid"`
CurrentTrick []*OhHellWebOutputTrickCard `json:"currentTrick"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
Hint *OhHellWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config OhHellWebOutputConfig `json:"config"`
}OhHellWebOutputConfig オー・ヘル設定アウトプット
type OhHellWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
MaxHandSize int `json:"maxHandSize"`
ScoringVariant int `json:"scoringVariant"`
RoundDirection int `json:"roundDirection"`
}OhHellWebOutputHint ヒント出力
type OhHellWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
Bid *int `json:"bid,omitempty"`
Reason string `json:"reason"`
}OhHellWebOutputPlayer オー・ヘルWebアウトプットプレイヤー
type OhHellWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Bid int `json:"bid"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
TrickCount int `json:"trickCount"`
}## type OhHellWebOutputTrickCard
OhHellWebOutputTrickCard トリック中の1枚
type OhHellWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}OldMaidCuiController ババ抜きCUIコントローラークラス
type OldMaidCuiController struct {
// contains filtered or unexported fields
}### func NewOldMaidCuiController
func NewOldMaidCuiController(omi usecase.OldMaidInteractorIF) *OldMaidCuiControllerNewOldMaidCuiController コンストラクタ
### func (*OldMaidCuiController) Exec
func (c *OldMaidCuiController) Exec(command string) stringExec コマンド実行 draw コマンドは “d N” または “draw N” の形式でカードインデックスを指定可能。 例: “d 2” → インデックス2のカードを引く / “d” → ランダムに引く
OldMaidWebController ババ抜きWebコントローラークラス
type OldMaidWebController = GameWebController[usecase.OldMaidInteractorIF, OldMaidWebInput, *OldMaidWebOutput]OldMaidWebInput ババ抜きWebインプット
type OldMaidWebInput struct {
BaseWebInput
DrawIdx *int `json:"drawIdx"` // 引くカードのインデックス。nil の場合はランダム選択。
ReorderIndices []int `json:"reorderIndices"`
Mode int `json:"mode"`
CpuPlacementStrategy bool `json:"cpuPlacementStrategy"`
CpuMemoryAI bool `json:"cpuMemoryAI"`
CpuHesitationEnabled bool `json:"cpuHesitationEnabled"`
CpuMetaAI bool `json:"cpuMetaAI"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (OldMaidWebInput) ToConfig
func (p OldMaidWebInput) ToConfig() (domain.OldMaidConfig, error)ToConfig builds an OldMaidConfig from the web input. Returns an error if Mode is out of range.
OldMaidWebOutput ババ抜きWebアウトプット
type OldMaidWebOutput struct {
Players []*OldMaidWebOutputPlayer `json:"players"`
CurrentTurn int `json:"currentTurn"`
NextDrawTargetIdx int `json:"nextDrawTargetIdx"`
GameEndFlag bool `json:"gameEndFlag"`
LoserIdx int `json:"loserIdx"`
LastDrawPlayerIdx int `json:"lastDrawPlayerIdx"`
LastDrawFromIdx int `json:"lastDrawFromIdx"`
LastDrawCard *WebOutputCard `json:"lastDrawCard"`
LastDiscardedPairs int `json:"lastDiscardedPairs"`
LastDiscardedCards []*WebOutputCard `json:"lastDiscardedCards"`
HasDrawn bool `json:"hasDrawn"`
CpuActions []*OldMaidWebOutputCpuAction `json:"cpuActions"`
HumanAction *OldMaidWebOutputCpuAction `json:"humanAction"`
DrawHistory []*OldMaidWebOutputDrawHistoryEntry `json:"drawHistory"`
CpuHighlightedCardIdx int `json:"cpuHighlightedCardIdx"`
RemovedCard *WebOutputCard `json:"removedCard"`
Mode int `json:"mode"`
WebOutputBase
MetaAI *OldMaidWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.OldMaidHumanProfileData `json:"profile,omitempty"`
}## type OldMaidWebOutputCpuAction
OldMaidWebOutputCpuAction CPUターンの行動記録
type OldMaidWebOutputCpuAction struct {
DrawPlayerIdx int `json:"drawPlayerIdx"`
DrawFromIdx int `json:"drawFromIdx"`
DrawnCard *WebOutputCard `json:"drawnCard"`
DiscardedPairs int `json:"discardedPairs"`
DiscardedCards []*WebOutputCard `json:"discardedCards"`
HesitationMs int `json:"hesitationMs,omitempty"`
}## type OldMaidWebOutputDrawHistoryEntry
OldMaidWebOutputDrawHistoryEntry ゲーム全体の引き履歴エントリ
type OldMaidWebOutputDrawHistoryEntry struct {
DrawPlayerIdx int `json:"drawPlayerIdx"`
DrawFromIdx int `json:"drawFromIdx"`
DiscardedPairs int `json:"discardedPairs"`
DrawerFinished bool `json:"drawerFinished"`
TargetFinished bool `json:"targetFinished"`
}## type OldMaidWebOutputMetaAI
OldMaidWebOutputMetaAI メタAI情報
type OldMaidWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
EdgePickRate float64 `json:"edgePickRate"`
}## type OldMaidWebOutputPlayer
OldMaidWebOutputPlayer ババ抜きWebアウトプットプレイヤー
type OldMaidWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
IsFinished bool `json:"isFinished"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
}OmahaCuiController オマハホールデムCUIコントローラークラス
type OmahaCuiController struct {
// contains filtered or unexported fields
}### func NewOmahaCuiController
func NewOmahaCuiController(oi usecase.OmahaInteractorIF) *OmahaCuiControllerNewOmahaCuiController コンストラクタ
### func (*OmahaCuiController) Exec
func (c *OmahaCuiController) Exec(command string) stringExec コマンド実行
OmahaWebController オマハホールデムWebコントローラークラス
type OmahaWebController = GameWebController[usecase.OmahaInteractorIF, OmahaWebInput, *OmahaWebOutput]OmahaWebInput オマハホールデムWebインプット (HoldemWebInputと同一構造)
type OmahaWebInput = HoldemWebInputOmahaWebOutput オマハホールデムWebアウトプット (HoldemWebOutputと同一構造)
type OmahaWebOutput = HoldemWebOutputPigsTailCuiController ぶたのしっぽCUIコントローラークラス
type PigsTailCuiController struct {
// contains filtered or unexported fields
}### func NewPigsTailCuiController
func NewPigsTailCuiController(pti usecase.PigsTailInteractorIF) *PigsTailCuiControllerNewPigsTailCuiController コンストラクタ
### func (*PigsTailCuiController) Exec
func (c *PigsTailCuiController) Exec(command string) stringExec コマンド実行
PigsTailWebController ぶたのしっぽWebコントローラークラス
type PigsTailWebController = GameWebController[usecase.PigsTailInteractorIF, PigsTailWebInput, *PigsTailWebOutput]PigsTailWebInput ぶたのしっぽWebインプット
type PigsTailWebInput struct {
BaseWebInput
CpuHesitationEnabled bool `json:"cpuHesitationEnabled"`
}PigsTailWebOutput ぶたのしっぽWebアウトプット
type PigsTailWebOutput struct {
Players []*PigsTailWebOutputPlayer `json:"players"`
CircleCount int `json:"circleCount"`
CenterTop *WebOutputCard `json:"centerTop"`
CenterCount int `json:"centerCount"`
CurrentTurn int `json:"currentTurn"`
GameEndFlag bool `json:"gameEndFlag"`
LoserIdx int `json:"loserIdx"`
LastDrawCard *WebOutputCard `json:"lastDrawCard"`
LastPenalty bool `json:"lastPenalty"`
CpuActions []*PigsTailWebOutputCpuAction `json:"cpuActions"`
HumanAction *PigsTailWebOutputCpuAction `json:"humanAction"`
WebOutputBase
}## type PigsTailWebOutputCpuAction
PigsTailWebOutputCpuAction CPUターンの行動記録
type PigsTailWebOutputCpuAction struct {
DrawPlayerIdx int `json:"drawPlayerIdx"`
DrawnCard *WebOutputCard `json:"drawnCard"`
PenaltyFlag bool `json:"penaltyFlag"`
PenaltyCount int `json:"penaltyCount"`
HesitationMs int `json:"hesitationMs,omitempty"`
}## type PigsTailWebOutputPlayer
PigsTailWebOutputPlayer ぶたのしっぽWebアウトプットプレイヤー
type PigsTailWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
}## type PineappleCuiController
PineappleCuiController パイナップルポーカーCUIコントローラークラス
type PineappleCuiController struct {
// contains filtered or unexported fields
}### func NewPineappleCuiController
func NewPineappleCuiController(pi usecase.PineappleInteractorIF) *PineappleCuiControllerNewPineappleCuiController コンストラクタ
### func (*PineappleCuiController) Exec
func (c *PineappleCuiController) Exec(command string) stringExec コマンド実行
## type PineappleWebController
PineappleWebController パイナップルポーカーWebコントローラークラス
type PineappleWebController = GameWebController[usecase.PineappleInteractorIF, PineappleWebInput, *PineappleWebOutput]PineappleWebInput パイナ���プルポーカーWebインプット
type PineappleWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
CardIdx *int `json:"cardIdx,omitempty"`
SmallBlind *int `json:"smallBlind,omitempty"`
BigBlind *int `json:"bigBlind,omitempty"`
TournamentMode *bool `json:"tournamentMode,omitempty"`
BlindLevelHands *int `json:"blindLevelHands,omitempty"`
BlindMultiplier *int `json:"blindMultiplier,omitempty"`
BettingLimit *int `json:"bettingLimit,omitempty"`
TableSize *int `json:"tableSize,omitempty"`
RebuyEnabled *bool `json:"rebuyEnabled,omitempty"`
RebuyMaxCount *int `json:"rebuyMaxCount,omitempty"`
RebuyChips *int `json:"rebuyChips,omitempty"`
RebuyPeriodHands *int `json:"rebuyPeriodHands,omitempty"`
AddonEnabled *bool `json:"addonEnabled,omitempty"`
AddonChips *int `json:"addonChips,omitempty"`
AddonAfterHand *int `json:"addonAfterHand,omitempty"`
CpuMetaAI bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (PineappleWebInput) ToConfig
func (p PineappleWebInput) ToConfig() (domain.PineappleConfig, error)ToConfig builds a PineappleConfig from the web input.
PineappleWebOutput パイナップルポーカーWebアウトプット
type PineappleWebOutput struct {
Players []*PineappleWebOutputPlayer `json:"players"`
CommunityCards []*WebOutputCard `json:"communityCards"`
Pot int `json:"pot"`
SidePots []*PineappleWebOutputSidePot `json:"sidePots"`
DealerIdx int `json:"dealerIdx"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
LastBet int `json:"lastBet"`
MinRaise int `json:"minRaise"`
BettingLimit int `json:"bettingLimit"`
RaiseCount int `json:"raiseCount"`
MaxBetAmount int `json:"maxBetAmount"`
RoundResults []*PineappleWebOutputResult `json:"roundResults"`
CpuActions []*PineappleWebOutputCpuAction `json:"cpuActions"`
HandCount int `json:"handCount"`
SmallBlind int `json:"smallBlind"`
BigBlind int `json:"bigBlind"`
TournamentMode bool `json:"tournamentMode"`
BlindLevelHands int `json:"blindLevelHands"`
BlindMultiplier int `json:"blindMultiplier"`
TableSize int `json:"tableSize"`
RebuyAvailable bool `json:"rebuyAvailable"`
AddonAvailable bool `json:"addonAvailable"`
RebuyCounts []int `json:"rebuyCounts"`
AddonUsed []bool `json:"addonUsed"`
RebuyEnabled bool `json:"rebuyEnabled"`
AddonEnabled bool `json:"addonEnabled"`
RebuyMaxCount int `json:"rebuyMaxCount"`
RebuyChips int `json:"rebuyChips"`
AddonChips int `json:"addonChips"`
RebuyPeriodHands int `json:"rebuyPeriodHands"`
AddonAfterHand int `json:"addonAfterHand"`
RebuyPhaseType int `json:"rebuyPhaseType"`
MuckAvailable bool `json:"muckAvailable"`
IsDiscardPhase bool `json:"isDiscardPhase"`
DiscardDone []bool `json:"discardDone"`
Equity *PineappleWebOutputEquity `json:"equity,omitempty"`
PotOdds *float64 `json:"potOdds,omitempty"`
MetaAI *PineappleWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.BettingHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}## type PineappleWebOutputCpuAction
PineappleWebOutputCpuAction パイナップルポーカーCPU行動記録
type PineappleWebOutputCpuAction = HoldemWebOutputCpuAction## type PineappleWebOutputEquity
PineappleWebOutputEquity パイナップルポーカーエクイティ情報
type PineappleWebOutputEquity = HoldemWebOutputEquity## type PineappleWebOutputMetaAI
PineappleWebOutputMetaAI メタAI情報
type PineappleWebOutputMetaAI = HoldemWebOutputMetaAI## type PineappleWebOutputPlayer
PineappleWebOutputPlayer パイナップルポーカーWebアウトプットプレイヤー
type PineappleWebOutputPlayer = HoldemWebOutputPlayer## type PineappleWebOutputResult
PineappleWebOutputResult パイナップルポーカーショーダウン結果
type PineappleWebOutputResult = HoldemWebOutputResult## type PineappleWebOutputSidePot
PineappleWebOutputSidePot パイナップルポーカーサイドポット
type PineappleWebOutputSidePot = HoldemWebOutputSidePotPinochleCuiController ピノクルCUIコントローラークラス
type PinochleCuiController struct {
// contains filtered or unexported fields
}### func NewPinochleCuiController
func NewPinochleCuiController(pi usecase.PinochleInteractorIF) *PinochleCuiControllerNewPinochleCuiController コンストラクタ
### func (*PinochleCuiController) Exec
func (c *PinochleCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
b / bid <amount> → ビッド
pa / pass → パス
t / trump <suit> → トランプスート宣言 (1-4)
m / meld → メルド確認
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ
sd / setdifficulty <0-2> → CPU難易度設定
sl / setlimit <n> → ポイント上限設定
h / hint → ヒント表示
log / l → 棋譜表示
PinochleWebConfig ピノクルWeb設定
type PinochleWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
}### func (*PinochleWebConfig) ToConfig
func (c *PinochleWebConfig) ToConfig() domain.PinochleConfigToConfig builds a PinochleConfig from the nested web config, applying bounds checking.
PinochleWebController ピノクルWebコントローラークラス
type PinochleWebController = GameWebController[usecase.PinochleInteractorIF, PinochleWebInput, *PinochleWebOutput]PinochleWebInput ピノクルWebインプット
type PinochleWebInput struct {
BaseWebInput
BidAmount *int `json:"bidAmount,omitempty"`
Suit *int `json:"suit,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *PinochleWebConfig `json:"config,omitempty"`
}### func (PinochleWebInput) ToConfig
func (p PinochleWebInput) ToConfig() domain.PinochleConfigToConfig builds a PinochleConfig from the web input.
PinochleWebOutput ピノクルWebアウトプット
type PinochleWebOutput struct {
Players []*PinochleWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
DealerIdx int `json:"dealerIdx"`
TrumpSuit int `json:"trumpSuit"`
HighestBid int `json:"highestBid"`
HighestBidder int `json:"highestBidder"`
CurrentTrick []*PinochleWebOutputTrickCard `json:"currentTrick"`
TeamScores [2]int `json:"teamScores"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerTeam int `json:"winnerTeam"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
PlayerMelds [4][]*PinochleWebOutputMeld `json:"playerMelds"`
ValidPlayIndices []int `json:"validPlayIndices,omitempty"`
Hint *PinochleWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config PinochleWebOutputConfig `json:"config"`
}## type PinochleWebOutputConfig
PinochleWebOutputConfig ピノクル設定アウトプット
type PinochleWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
}PinochleWebOutputHint ヒント出力
type PinochleWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
BidAmount *int `json:"bidAmount,omitempty"`
Pass *bool `json:"pass,omitempty"`
Suit *int `json:"suit,omitempty"`
Reason string `json:"reason"`
}PinochleWebOutputMeld メルド情報
type PinochleWebOutputMeld struct {
Type int `json:"type"`
Points int `json:"points"`
Cards []*WebOutputCard `json:"cards"`
}## type PinochleWebOutputPlayer
PinochleWebOutputPlayer ピノクルWebアウトプットプレイヤー
type PinochleWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Team int `json:"team"`
TrickCount int `json:"trickCount"`
Bid int `json:"bid"`
HasPassed bool `json:"hasPassed"`
MeldScore int `json:"meldScore"`
TrickPoints int `json:"trickPoints"`
}## type PinochleWebOutputTrickCard
PinochleWebOutputTrickCard トリック中の1枚
type PinochleWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}PokerCuiController ポーカーCUIコントローラークラス
type PokerCuiController struct {
// contains filtered or unexported fields
}### func NewPokerCuiController
func NewPokerCuiController(pi usecase.PokerInteractorIF) *PokerCuiControllerNewPokerCuiController コンストラクタ
### func (*PokerCuiController) Exec
func (pcc *PokerCuiController) Exec(command string) stringExec ゲーム実行 コマンド例: “r”, “e 0 2 4”, “s”, “b 20”, “c”, “ra 30”, “f”, “ck”, “a”, “q”
PokerWebController ポーカーWebコントローラークラス
type PokerWebController = GameWebController[usecase.PokerInteractorIF, PokerWebInput, *PokerWebOutput]PokerWebInput ポーカーWebインプット
type PokerWebInput struct {
BaseWebInput
Indices []int `json:"indices,omitempty"`
Amount int `json:"amount,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
CpuCount *int `json:"cpuCount,omitempty"`
JokerCount *int `json:"jokerCount,omitempty"`
BettingLimit *int `json:"bettingLimit,omitempty"`
IsLowball *bool `json:"isLowball,omitempty"`
CpuMetaAI bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (PokerWebInput) ToConfig
func (p PokerWebInput) ToConfig() domain.PokerConfigToConfig builds a PokerConfig from the web input, applying bounds clamping.
PokerWebOutput ポーカーWebアウトプット
type PokerWebOutput struct {
Players []*PokerWebOutputPlayer `json:"players"`
Pot int `json:"pot"`
SidePots []*PokerWebOutputSidePot `json:"sidePots"`
DealerIdx int `json:"dealerIdx"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
LastBet int `json:"lastBet"`
MinRaise int `json:"minRaise"`
Ante int `json:"ante"`
JokerCount int `json:"jokerCount"`
BettingLimit int `json:"bettingLimit"`
RaiseCount int `json:"raiseCount"`
MaxBetAmount int `json:"maxBetAmount"`
RoundResults []*PokerWebOutputResult `json:"roundResults"`
CpuActions []*PokerWebOutputCpuAction `json:"cpuActions"`
CpuExchanges []*PokerWebOutputCpuExchange `json:"cpuExchanges"`
Odds []*PokerWebOutputOdds `json:"odds,omitempty"`
IsLowball bool `json:"isLowball"`
MetaAI *PokerWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.BettingHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}## type PokerWebOutputCpuAction
PokerWebOutputCpuAction ポーカーCPU行動記録
type PokerWebOutputCpuAction struct {
PlayerIdx int `json:"playerIdx"`
Action int `json:"action"`
Amount int `json:"amount"`
}## type PokerWebOutputCpuExchange
PokerWebOutputCpuExchange ポーカーCPU交換記録
type PokerWebOutputCpuExchange struct {
PlayerIdx int `json:"playerIdx"`
ExchangeCount int `json:"exchangeCount"`
}PokerWebOutputMetaAI メタAI情報
type PokerWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
BluffRate float64 `json:"bluffRate"`
FoldRate float64 `json:"foldRate"`
HesitationMean float64 `json:"hesitationMean"`
}PokerWebOutputOdds ポーカードローオッズ
type PokerWebOutputOdds struct {
HandRank int `json:"handRank"`
HandName string `json:"handName"`
Probability float64 `json:"probability"`
Count int `json:"count"`
Total int `json:"total"`
}PokerWebOutputPlayer ポーカーWebアウトプットプレイヤー
type PokerWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
Cards []*WebOutputCard `json:"cards"`
Chips int `json:"chips"`
CurrentBet int `json:"currentBet"`
Folded bool `json:"folded"`
AllIn bool `json:"allIn"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
ExchangeCount int `json:"exchangeCount"`
PlayStyleName string `json:"playStyleName"`
}PokerWebOutputResult ポーカーショーダウン結果
type PokerWebOutputResult struct {
PlayerIdx int `json:"playerIdx"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
Kickers string `json:"kickers"`
WonAmount int `json:"wonAmount"`
}PokerWebOutputSidePot ポーカーサイドポット
type PokerWebOutputSidePot struct {
Amount int `json:"amount"`
EligiblePlayers []int `json:"eligiblePlayers"`
}PyramidCuiController ピラミッドCUIコントローラークラス
type PyramidCuiController struct {
// contains filtered or unexported fields
}### func NewPyramidCuiController
func NewPyramidCuiController(pi usecase.PyramidInteractorIF) *PyramidCuiControllerNewPyramidCuiController コンストラクタ
### func (*PyramidCuiController) Exec
func (c *PyramidCuiController) Exec(command string) stringExec コマンド実行
PyramidWebCard カード位置指定
type PyramidWebCard struct {
Zone string `json:"zone"` // "pyramid" or "waste"
Row *int `json:"row,omitempty"`
Col *int `json:"col,omitempty"`
}PyramidWebController ピラミッドWebコントローラークラス
type PyramidWebController = GameWebController[usecase.PyramidInteractorIF, PyramidWebInput, *PyramidWebOutput]PyramidWebInput ピラミッドWebインプット
type PyramidWebInput struct {
BaseWebInput
Card1 *PyramidWebCard `json:"card1,omitempty"`
Card2 *PyramidWebCard `json:"card2,omitempty"`
}PyramidWebOutput ピラミッドWebアウトプット
type PyramidWebOutput struct {
Pyramid [][]*PyramidWebOutputCard `json:"pyramid"`
StockCount int `json:"stockCount"`
Waste []*WebOutputCard `json:"waste"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Hint *PyramidWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}PyramidWebOutputCard ピラミッドカード出力
type PyramidWebOutputCard struct {
Card *WebOutputCard `json:"card"`
Removed bool `json:"removed"`
Exposed bool `json:"exposed"`
}PyramidWebOutputHint ヒント出力
type PyramidWebOutputHint struct {
Type string `json:"type"`
Row1 int `json:"row1"`
Col1 int `json:"col1"`
Row2 int `json:"row2"`
Col2 int `json:"col2"`
}SessionProvider is the interface that abstracts session storage. In-memory and KV-backed implementations both satisfy this contract so that GameWebController works identically on Docker and Workers.
type SessionProvider[T any] interface {
// Acquire returns the interactor for the given session ID (creating it
// via factory when the session does not exist), a release function that
// MUST be called when the request is done, and a success flag.
Acquire(id string, factory func() T) (T, SessionRelease, bool)
// Stop releases background resources owned by the provider.
Stop()
}SessionRelease is a callback invoked after a request finishes processing. For in-memory sessions it unlocks the per-session mutex; for KV-backed sessions it serialises the interactor state and writes it back to KV.
type SessionRelease func()SessionStore is a generic, goroutine-safe map of session ID → value with TTL-based eviction and a hard cap on concurrent sessions.
type SessionStore[T any] struct {
// contains filtered or unexported fields
}func NewSessionStore[T any]() *SessionStore[T]NewSessionStore creates a SessionStore and starts a background cleanup goroutine. Call Stop() when the store is no longer needed.
### func (*SessionStore[T]) EvictExpired
func (s *SessionStore[T]) EvictExpired()EvictExpired removes sessions that have not been used within SessionTTL. It is exported so tests can trigger eviction without waiting for the ticker.
### func (*SessionStore[T]) GetWithLock
func (s *SessionStore[T]) GetWithLock(id string, factory func() T) (T, *sync.Mutex, bool)GetWithLock returns the value for the given sessionId (creating it via factory if needed) along with a per-session mutex. The caller must use defer mu.Unlock() after mu.Lock() to ensure the lock is always released. This prevents concurrent requests for the same session from racing on shared state.
### func (*SessionStore[T]) Len
func (s *SessionStore[T]) Len() intLen returns the current number of sessions.
### func (*SessionStore[T]) Stop
func (s *SessionStore[T]) Stop()Stop shuts down the background cleanup goroutine. Safe to call multiple times.
## type SevenCardStudCuiController
SevenCardStudCuiController セブンカードスタッドCUIコントローラークラス
type SevenCardStudCuiController struct {
// contains filtered or unexported fields
}### func NewSevenCardStudCuiController
func NewSevenCardStudCuiController(si usecase.SevenCardStudInteractorIF) *SevenCardStudCuiControllerNewSevenCardStudCuiController コンストラクタ
### func (*SevenCardStudCuiController) Exec
func (c *SevenCardStudCuiController) Exec(command string) stringExec コマンド実行
## type SevenCardStudWebController
SevenCardStudWebController セブンカードスタッドWebコントローラークラス
type SevenCardStudWebController = GameWebController[usecase.SevenCardStudInteractorIF, SevenCardStudWebInput, *SevenCardStudWebOutput]SevenCardStudWebInput セブンカードスタッドWebインプット
type SevenCardStudWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
HumanPlayMs int `json:"humanPlayMs,omitempty"`
Ante *int `json:"ante,omitempty"`
BringIn *int `json:"bringIn,omitempty"`
SmallBet *int `json:"smallBet,omitempty"`
BigBet *int `json:"bigBet,omitempty"`
TournamentMode *bool `json:"tournamentMode,omitempty"`
AnteLevelHands *int `json:"anteLevelHands,omitempty"`
AnteMultiplier *int `json:"anteMultiplier,omitempty"`
BettingLimit *int `json:"bettingLimit,omitempty"`
TableSize *int `json:"tableSize,omitempty"`
RebuyEnabled *bool `json:"rebuyEnabled,omitempty"`
RebuyMaxCount *int `json:"rebuyMaxCount,omitempty"`
RebuyChips *int `json:"rebuyChips,omitempty"`
RebuyPeriodHands *int `json:"rebuyPeriodHands,omitempty"`
AddonEnabled *bool `json:"addonEnabled,omitempty"`
AddonChips *int `json:"addonChips,omitempty"`
AddonAfterHand *int `json:"addonAfterHand,omitempty"`
CpuMetaAI bool `json:"cpuMetaAI,omitempty"`
Profile json.RawMessage `json:"profile,omitempty"`
}### func (SevenCardStudWebInput) ToConfig
func (p SevenCardStudWebInput) ToConfig() (domain.SevenCardStudConfig, error)ToConfig builds a SevenCardStudConfig from the web input. Returns an error if the table size is invalid.
## type SevenCardStudWebOutput
SevenCardStudWebOutput セブンカードスタッドWebアウトプット
type SevenCardStudWebOutput struct {
Players []*SevenCardStudWebOutputPlayer `json:"players"`
CommunityCard *WebOutputCard `json:"communityCard"`
Pot int `json:"pot"`
SidePots []*SevenCardStudWebOutputSidePot `json:"sidePots"`
DealerIdx int `json:"dealerIdx"`
CurrentTurn int `json:"currentTurn"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
LastBet int `json:"lastBet"`
MinRaise int `json:"minRaise"`
BettingLimit int `json:"bettingLimit"`
RaiseCount int `json:"raiseCount"`
MaxBetAmount int `json:"maxBetAmount"`
RoundResults []*SevenCardStudWebOutputResult `json:"roundResults"`
CpuActions []*SevenCardStudWebOutputCpuAction `json:"cpuActions"`
HandCount int `json:"handCount"`
Ante int `json:"ante"`
BringIn int `json:"bringIn"`
SmallBet int `json:"smallBet"`
BigBet int `json:"bigBet"`
TournamentMode bool `json:"tournamentMode"`
AnteLevelHands int `json:"anteLevelHands"`
AnteMultiplier int `json:"anteMultiplier"`
TableSize int `json:"tableSize"`
BringInPlayerIdx int `json:"bringInPlayerIdx"`
RebuyAvailable bool `json:"rebuyAvailable"`
AddonAvailable bool `json:"addonAvailable"`
RebuyCounts []int `json:"rebuyCounts"`
AddonUsed []bool `json:"addonUsed"`
RebuyEnabled bool `json:"rebuyEnabled"`
AddonEnabled bool `json:"addonEnabled"`
RebuyMaxCount int `json:"rebuyMaxCount"`
RebuyChips int `json:"rebuyChips"`
AddonChips int `json:"addonChips"`
RebuyPeriodHands int `json:"rebuyPeriodHands"`
AddonAfterHand int `json:"addonAfterHand"`
RebuyPhaseType int `json:"rebuyPhaseType"`
MuckAvailable bool `json:"muckAvailable"`
MetaAI *SevenCardStudWebOutputMetaAI `json:"metaAI,omitempty"`
Profile *domain.BettingHumanProfileData `json:"profile,omitempty"`
WebOutputBase
}## type SevenCardStudWebOutputCpuAction
SevenCardStudWebOutputCpuAction セブンカードスタッドCPU行動記録
type SevenCardStudWebOutputCpuAction struct {
PlayerIdx int `json:"playerIdx"`
Action int `json:"action"`
Amount int `json:"amount"`
}## type SevenCardStudWebOutputMetaAI
SevenCardStudWebOutputMetaAI メタAI情報
type SevenCardStudWebOutputMetaAI struct {
Enabled bool `json:"enabled"`
GamesPlayed int `json:"gamesPlayed"`
BluffRate float64 `json:"bluffRate"`
FoldRate float64 `json:"foldRate"`
HesitationMean float64 `json:"hesitationMean"`
}## type SevenCardStudWebOutputPlayer
SevenCardStudWebOutputPlayer セブンカードスタッドWebアウトプットプレイヤー
type SevenCardStudWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
HoleCards []*WebOutputCard `json:"holeCards"`
DoorCards []*WebOutputCard `json:"doorCards"`
Chips int `json:"chips"`
CurrentBet int `json:"currentBet"`
Folded bool `json:"folded"`
AllIn bool `json:"allIn"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
BestHand []*WebOutputCard `json:"bestHand"`
PlayStyleName string `json:"playStyleName"`
TotalHands int `json:"totalHands"`
VPIP int `json:"vpip"`
PFR int `json:"pfr"`
ThreeBet int `json:"threeBet"`
AF string `json:"af"`
}## type SevenCardStudWebOutputResult
SevenCardStudWebOutputResult セブンカードスタッドショーダウン結果
type SevenCardStudWebOutputResult struct {
PlayerIdx int `json:"playerIdx"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
Kickers string `json:"kickers"`
BestHand []*WebOutputCard `json:"bestHand"`
WonAmount int `json:"wonAmount"`
Mucked bool `json:"mucked"`
}## type SevenCardStudWebOutputSidePot
SevenCardStudWebOutputSidePot セブンカードスタッドサイドポット
type SevenCardStudWebOutputSidePot struct {
Amount int `json:"amount"`
EligiblePlayers []int `json:"eligiblePlayers"`
}SevensCuiController 7並べCUIコントローラークラス
type SevensCuiController struct {
// contains filtered or unexported fields
}### func NewSevensCuiController
func NewSevensCuiController(sgi usecase.SevensInteractorIF) *SevensCuiControllerNewSevensCuiController コンストラクタ
### func (*SevensCuiController) Exec
func (c *SevensCuiController) Exec(command string) stringExec コマンド実行 play コマンドは “p [インデックス]” の形式でカードインデックスを指定。 インデックスなし (“p”) の場合はパス扱い (idx = -1)。 joker コマンドは “j [カードインデックス] [スート] [値]” の形式。 例: “p” → パス / “p 2” → 2番のカードを出す / “j 0 1 6” → ジョーカー(手札0)をスート1値6に配置
SevensWebController 7並べWebコントローラークラス
type SevensWebController = GameWebController[usecase.SevensInteractorIF, SevensWebInput, *SevensWebOutput]SevensWebInput 7並べWebインプット
type SevensWebInput struct {
BaseWebInput
Index int `json:"index"` // 出すカードのインデックス。play コマンド用。-1 でパス。
JokerTargetSuit int `json:"jokerTargetSuit"` // ジョーカー配置先スート
JokerTargetValue int `json:"jokerTargetValue"` // ジョーカー配置先値
TunnelEnabled *bool `json:"tunnelEnabled,omitempty"` // トンネルルール (reset時のみ)
TunnelSkipWidth *int `json:"tunnelSkipWidth,omitempty"` // カスタムトンネルスキップ幅 (reset時のみ)
JokerCount *int `json:"jokerCount,omitempty"` // ジョーカー枚数 (reset時のみ)
CpuStrategy *int `json:"cpuStrategy,omitempty"` // CPU戦略モード (reset時のみ, 0=シンプル, 1=戦略的, 2=嫌がらせ特化)
MaxPasses *int `json:"maxPasses,omitempty"` // 最大パス回数 (reset時のみ, 0=無制限)
NoJokerFinish *bool `json:"noJokerFinish,omitempty"` // ジョーカー上がり禁止 (reset時のみ)
JokerReclaim *bool `json:"jokerReclaim,omitempty"` // ジョーカー回収 (reset時のみ)
EndStop *bool `json:"endStop,omitempty"` // 片側ストップ (reset時のみ)
JokerConsecutiveBanned *bool `json:"jokerConsecutiveBanned,omitempty"` // ジョーカー連続禁止 (reset時のみ)
}### func (SevensWebInput) HasConfigParams
func (p SevensWebInput) HasConfigParams() boolHasConfigParams reports whether any config parameter is set in the input.
### func (SevensWebInput) ToConfig
func (p SevensWebInput) ToConfig() domain.SevensConfigToConfig builds a SevensConfig from the web input pointer fields.
SevensWebOutput 7並べWebアウトプット
type SevensWebOutput struct {
Players []*SevensWebOutputPlayer `json:"players"`
CurrentTurn int `json:"currentTurn"`
TableMinVals [5]int `json:"tableMinVals"`
TableMaxVals [5]int `json:"tableMaxVals"`
TablePlaced [5]int `json:"tablePlaced"`
Config SevensWebOutputConfig `json:"config"`
GameEndFlag bool `json:"gameEndFlag"`
CpuActions []*SevensWebOutputAction `json:"cpuActions"`
HumanAction *SevensWebOutputAction `json:"humanAction"`
WebOutputBase
}SevensWebOutputAction 7並べのプレイヤー行動記録
type SevensWebOutputAction struct {
PlayerIdx int `json:"playerIdx"`
PlayedCard *WebOutputCard `json:"playedCard"` // nil = パス
TargetSuit int `json:"targetSuit"`
TargetValue int `json:"targetValue"`
ForcedPass bool `json:"forcedPass"`
}SevensWebOutputConfig 7並べゲーム設定出力
type SevensWebOutputConfig struct {
TunnelEnabled bool `json:"tunnelEnabled"`
TunnelSkipWidth int `json:"tunnelSkipWidth"`
JokerCount int `json:"jokerCount"`
CpuStrategy int `json:"cpuStrategy"`
MaxPasses int `json:"maxPasses"`
NoJokerFinish bool `json:"noJokerFinish"`
JokerReclaimEnabled bool `json:"jokerReclaimEnabled"`
EndStopEnabled bool `json:"endStopEnabled"`
JokerConsecutiveBanned bool `json:"jokerConsecutiveBanned"`
}SevensWebOutputPlayer 7並べWebアウトプットプレイヤー
type SevensWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
IsFinished bool `json:"isFinished"`
Rank int `json:"rank"`
CardCount int `json:"cardCount"`
PassesUsed int `json:"passesUsed"`
MaxPasses int `json:"maxPasses"`
Cards []*WebOutputCard `json:"cards"`
LastPlayedJoker bool `json:"lastPlayedJoker"`
}## type ShortDeckCuiController
ShortDeckCuiController ショートデックホールデムCUIコントローラークラス
type ShortDeckCuiController struct {
// contains filtered or unexported fields
}### func NewShortDeckCuiController
func NewShortDeckCuiController(oi usecase.ShortDeckInteractorIF) *ShortDeckCuiControllerNewShortDeckCuiController コンストラクタ
### func (*ShortDeckCuiController) Exec
func (c *ShortDeckCuiController) Exec(command string) stringExec コマンド実行
## type ShortDeckWebController
ShortDeckWebController ショートデックホールデムWebコントローラークラス
type ShortDeckWebController = GameWebController[usecase.ShortDeckInteractorIF, ShortDeckWebInput, *ShortDeckWebOutput]ShortDeckWebInput ショートデックホールデムWebインプット (HoldemWebInputと同一構造)
type ShortDeckWebInput = HoldemWebInputShortDeckWebOutput ショートデックホールデムWebアウトプット (HoldemWebOutputと同一構造)
type ShortDeckWebOutput = HoldemWebOutputSpadesCuiController スペードCUIコントローラークラス
type SpadesCuiController struct {
// contains filtered or unexported fields
}### func NewSpadesCuiController
func NewSpadesCuiController(si usecase.SpadesInteractorIF) *SpadesCuiControllerNewSpadesCuiController コンストラクタ
### func (*SpadesCuiController) Exec
func (c *SpadesCuiController) Exec(command string) stringExec コマンド実行 コマンド一覧:
q / quit → ゲーム終了 ("bye.")
r / reset → ゲームリセット (設定保持)
b / bid <n> → ビッドを宣言
p / play <i> → カードをプレイ
n / next → 次のトリックへ
nr / nextround → 次のラウンドへ (スコアリング)
sd / setdifficulty <0-2> → CPU難易度設定
sl / setlimit <n> → ポイント上限設定
h / hint → ヒント表示
log / l → 棋譜表示
SpadesWebConfig スペードWeb設定
type SpadesWebConfig struct {
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
PointLimit *int `json:"pointLimit,omitempty"`
NilBonus *int `json:"nilBonus,omitempty"`
BagPenaltyThreshold *int `json:"bagPenaltyThreshold,omitempty"`
}### func (*SpadesWebConfig) ToConfig
func (c *SpadesWebConfig) ToConfig() domain.SpadesConfigToConfig builds a SpadesConfig from the nested web config, applying bounds checking.
SpadesWebController スペードWebコントローラークラス
type SpadesWebController = GameWebController[usecase.SpadesInteractorIF, SpadesWebInput, *SpadesWebOutput]SpadesWebInput スペードWebインプット
type SpadesWebInput struct {
BaseWebInput
Bid *int `json:"bid,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
Config *SpadesWebConfig `json:"config,omitempty"`
}### func (SpadesWebInput) ToConfig
func (p SpadesWebInput) ToConfig() domain.SpadesConfigToConfig builds a SpadesConfig from the web input.
SpadesWebOutput スペードWebアウトプット
type SpadesWebOutput struct {
Players []*SpadesWebOutputPlayer `json:"players"`
Phase int `json:"phase"`
RoundNumber int `json:"roundNumber"`
TrickNumber int `json:"trickNumber"`
CurrentPlayerIdx int `json:"currentPlayerIdx"`
BidPlayerIdx int `json:"bidPlayerIdx"`
CurrentTrick []*SpadesWebOutputTrickCard `json:"currentTrick"`
SpadesBroken bool `json:"spadesBroken"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
LeadPlayerIdx int `json:"leadPlayerIdx"`
Hint *SpadesWebOutputHint `json:"hint,omitempty"`
WebOutputBase
Config SpadesWebOutputConfig `json:"config"`
}SpadesWebOutputConfig スペード設定アウトプット
type SpadesWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
PointLimit int `json:"pointLimit"`
NilBonus int `json:"nilBonus"`
BagPenaltyThreshold int `json:"bagPenaltyThreshold"`
}SpadesWebOutputHint ヒント出力
type SpadesWebOutputHint struct {
CardIndex *int `json:"cardIndex,omitempty"`
Bid *int `json:"bid,omitempty"`
Reason string `json:"reason"`
}SpadesWebOutputPlayer スペードWebアウトプットプレイヤー
type SpadesWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
Bid int `json:"bid"`
RoundScore int `json:"roundScore"`
CumulativeScore int `json:"cumulativeScore"`
TrickCount int `json:"trickCount"`
Bags int `json:"bags"`
}## type SpadesWebOutputTrickCard
SpadesWebOutputTrickCard トリック中の1枚
type SpadesWebOutputTrickCard struct {
PlayerIdx int `json:"playerIdx"`
Card *WebOutputCard `json:"card"`
}SpeedCuiController スピードCUIコントローラークラス
type SpeedCuiController struct {
// contains filtered or unexported fields
}### func NewSpeedCuiController
func NewSpeedCuiController(si usecase.SpeedInteractorIF) *SpeedCuiControllerNewSpeedCuiController コンストラクタ
### func (*SpeedCuiController) Exec
func (c *SpeedCuiController) Exec(command string) stringExec コマンド実行
q / quit → ゲーム終了
r / reset → ゲームリセット
p <card> <pile> → カードを出す (card=手札idx, pile=台札idx)
play (同上)
f / flip → 膠着時にカードをめくる
sd / setdifficulty <0-2> → CPU難易度設定
h / hint → ヒント表示
log / l → 棋譜表示
SpeedWebController スピードWebコントローラー型
type SpeedWebController = GameWebController[usecase.SpeedInteractorIF, SpeedWebInput, *SpeedWebOutput]SpeedWebInput スピードWebインプット
type SpeedWebInput struct {
BaseWebInput
CardIndex *int `json:"cardIndex,omitempty"`
PileIndex *int `json:"pileIndex,omitempty"`
CpuDifficulty *int `json:"cpuDifficulty,omitempty"`
}### func (SpeedWebInput) ToConfig
func (in SpeedWebInput) ToConfig() domain.SpeedConfigToConfig インプットからSpeedConfigを生成する
SpeedWebOutput スピードWebアウトプット
type SpeedWebOutput struct {
Players []*SpeedWebOutputPlayer `json:"players"`
CenterPiles []*WebOutputCard `json:"centerPiles"`
Phase int `json:"phase"`
GameEndFlag bool `json:"gameEndFlag"`
WinnerIdx int `json:"winnerIdx"`
CpuActions []*SpeedWebOutputCpuAction `json:"cpuActions,omitempty"`
Hint *SpeedWebOutputHint `json:"hint,omitempty"`
Config SpeedWebOutputConfig `json:"config"`
WebOutputBase
}SpeedWebOutputConfig 設定情報
type SpeedWebOutputConfig struct {
CpuDifficulty int `json:"cpuDifficulty"`
}## type SpeedWebOutputCpuAction
SpeedWebOutputCpuAction CPU行動記録
type SpeedWebOutputCpuAction struct {
CardIndex int `json:"cardIndex"`
PileIndex int `json:"pileIndex"`
}SpeedWebOutputHint ヒント情報
type SpeedWebOutputHint struct {
CardIndex int `json:"cardIndex"`
PileIndex int `json:"pileIndex"`
Found bool `json:"found"`
}SpeedWebOutputPlayer スピードWebアウトプットプレイヤー
type SpeedWebOutputPlayer struct {
ID int `json:"id"`
IsHuman bool `json:"isHuman"`
CardCount int `json:"cardCount"`
Cards []*WebOutputCard `json:"cards"`
DrawPileSize int `json:"drawPileSize"`
}SpiderCuiController スパイダーソリティアCUIコントローラークラス
type SpiderCuiController struct {
// contains filtered or unexported fields
}### func NewSpiderCuiController
func NewSpiderCuiController(si usecase.SpiderInteractorIF) *SpiderCuiControllerNewSpiderCuiController コンストラクタ
### func (*SpiderCuiController) Exec
func (c *SpiderCuiController) Exec(command string) stringExec コマンド実行
SpiderWebConfig 設定
type SpiderWebConfig struct {
Difficulty *int `json:"difficulty,omitempty"`
}SpiderWebController スパイダーソリティアWebコントローラークラス
type SpiderWebController = GameWebController[usecase.SpiderInteractorIF, SpiderWebInput, *SpiderWebOutput]SpiderWebInput スパイダーソリティアWebインプット
type SpiderWebInput struct {
BaseWebInput
From *SpiderWebZone `json:"from,omitempty"`
To *SpiderWebZone `json:"to,omitempty"`
Config *SpiderWebConfig `json:"config,omitempty"`
}SpiderWebOutput スパイダーソリティアWebアウトプット
type SpiderWebOutput struct {
Tableau [][]*SpiderWebOutputTableauCard `json:"tableau"`
StockCount int `json:"stockCount"`
CompletedSuits int `json:"completedSuits"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Score int `json:"score"`
Difficulty int `json:"difficulty"`
Hint *SpiderWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}SpiderWebOutputHint ヒント出力
type SpiderWebOutputHint struct {
FromCol int `json:"fromCol"`
CardIndex int `json:"cardIndex"`
ToCol int `json:"toCol"`
}## type SpiderWebOutputTableauCard
SpiderWebOutputTableauCard タブローカード出力
type SpiderWebOutputTableauCard struct {
Card *WebOutputCard `json:"card"`
FaceUp bool `json:"faceUp"`
}SpiderWebZone ゾーン指定
type SpiderWebZone struct {
Zone string `json:"zone"`
Col *int `json:"col,omitempty"`
CardIndex *int `json:"cardIndex,omitempty"`
}## type ThreeCardCuiController
ThreeCardCuiController スリーカードポーカーCUIコントローラークラス
type ThreeCardCuiController struct {
// contains filtered or unexported fields
}### func NewThreeCardCuiController
func NewThreeCardCuiController(ti usecase.ThreeCardInteractorIF) *ThreeCardCuiControllerNewThreeCardCuiController コンストラクタ
### func (*ThreeCardCuiController) Exec
func (tcc *ThreeCardCuiController) Exec(command string) stringExec ゲーム実行 コマンド例: “r”, “b 100”, “b 100 50”, “p”, “f”, “q”
## type ThreeCardWebController
ThreeCardWebController スリーカードポーカーWebコントローラークラス
type ThreeCardWebController = GameWebController[usecase.ThreeCardInteractorIF, ThreeCardWebInput, *ThreeCardWebOutput]ThreeCardWebInput スリーカードポーカーWebインプット
type ThreeCardWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
PairPlusBet *int `json:"pairPlusBet,omitempty"`
}ThreeCardWebOutput スリーカードポーカーWebアウトプット
type ThreeCardWebOutput struct {
PlayerHand []*WebOutputCard `json:"playerHand"`
DealerHand []*WebOutputCard `json:"dealerHand"`
Phase int `json:"phase"`
Chips int `json:"chips"`
AnteBet int `json:"anteBet"`
PairPlusBet int `json:"pairPlusBet"`
PlayBet int `json:"playBet"`
Result int `json:"result"`
AntePayout int `json:"antePayout"`
PlayPayout int `json:"playPayout"`
AnteBonusPayout int `json:"anteBonusPayout"`
PairPlusPayout int `json:"pairPlusPayout"`
TotalPayout int `json:"totalPayout"`
DealerQualified bool `json:"dealerQualified"`
PlayerHandRank int `json:"playerHandRank"`
DealerHandRank int `json:"dealerHandRank"`
WebOutputBase
}TriPeaksCuiController トリピークスCUIコントローラークラス
type TriPeaksCuiController struct {
// contains filtered or unexported fields
}### func NewTriPeaksCuiController
func NewTriPeaksCuiController(ti usecase.TriPeaksInteractorIF) *TriPeaksCuiControllerNewTriPeaksCuiController コンストラクタ
### func (*TriPeaksCuiController) Exec
func (c *TriPeaksCuiController) Exec(command string) stringExec コマンド実行
TriPeaksWebController トリピークスWebコントローラークラス
type TriPeaksWebController = GameWebController[usecase.TriPeaksInteractorIF, TriPeaksWebInput, *TriPeaksWebOutput]TriPeaksWebInput トリピークスWebインプット
type TriPeaksWebInput struct {
BaseWebInput
Row *int `json:"row,omitempty"`
Col *int `json:"col,omitempty"`
}TriPeaksWebOutput トリピークスWebアウトプット
type TriPeaksWebOutput struct {
Layout [][]*TriPeaksWebOutputCard `json:"layout"`
StockCount int `json:"stockCount"`
Waste []*WebOutputCard `json:"waste"`
Phase int `json:"phase"`
MoveCount int `json:"moveCount"`
CanUndo bool `json:"canUndo"`
IsStalemate bool `json:"isStalemate"`
UndoToEscape int `json:"undoToEscape"`
Hint *TriPeaksWebOutputHint `json:"hint,omitempty"`
WebOutputBase
}TriPeaksWebOutputCard タブローカード出力
type TriPeaksWebOutputCard struct {
Card *WebOutputCard `json:"card"`
Removed bool `json:"removed"`
Exposed bool `json:"exposed"`
}TriPeaksWebOutputHint ヒント出力
type TriPeaksWebOutputHint struct {
Type string `json:"type"`
Row int `json:"row"`
Col int `json:"col"`
}## type VideoPokerCuiController
VideoPokerCuiController ビデオポーカーCUIコントローラークラス
type VideoPokerCuiController struct {
// contains filtered or unexported fields
}### func NewVideoPokerCuiController
func NewVideoPokerCuiController(vi usecase.VideoPokerInteractorIF) *VideoPokerCuiControllerNewVideoPokerCuiController コンストラクタ
### func (*VideoPokerCuiController) Exec
func (vpc *VideoPokerCuiController) Exec(command string) stringExec ゲーム実行 コマンド例: “r”, “b 3”, “h 0 1 4”, “log”, “q”
## type VideoPokerWebController
VideoPokerWebController ビデオポーカーWebコントローラークラス
type VideoPokerWebController = GameWebController[usecase.VideoPokerInteractorIF, VideoPokerWebInput, *VideoPokerWebOutput]VideoPokerWebInput ビデオポーカーWebインプット
type VideoPokerWebInput struct {
BaseWebInput
Amount int `json:"amount,omitempty"`
Indices []int `json:"indices,omitempty"`
}VideoPokerWebOutput ビデオポーカーWebアウトプット
type VideoPokerWebOutput struct {
Hand []*WebOutputCard `json:"hand"`
Phase int `json:"phase"`
Chips int `json:"chips"`
BetAmount int `json:"betAmount"`
Result int `json:"result"`
Payout int `json:"payout"`
HandRank int `json:"handRank"`
HandName string `json:"handName"`
HeldIndices [5]bool `json:"heldIndices"`
VariantName string `json:"variantName"`
WebOutputBase
}WebInput is the interface that all web controller input structs must implement.
type WebInput interface {
GetCommand() string
GetSessionID() string
}WebOutputBase holds fields common to all game WebOutput structs.
type WebOutputBase struct {
Message string `json:"message"`
MessageCode string `json:"messageCode,omitempty"`
MessageParams map[string]string `json:"messageParams,omitempty"`
}WebOutputCard 共通Webアウトプットカード
type WebOutputCard struct {
Design string `json:"design"`
Value int `json:"value"`
}Generated by gomarkdoc