import "github.com/yuta-yoshinaga/go_trumpcards/internal/usecase"const (
// CrazyEightsPhaseRoundEnd ラウンド終了フェーズ (domain からの再エクスポート)
CrazyEightsPhaseRoundEnd = domain.CrazyEightsPhaseRoundEnd
// CrazyEightsPhaseGameEnd ゲーム終了フェーズ (domain からの再エクスポート)
CrazyEightsPhaseGameEnd = domain.CrazyEightsPhaseGameEnd
)BaccaratInteractor バカラインタラクタークラス
type BaccaratInteractor struct {
// contains filtered or unexported fields
}### func NewBaccaratInteractor
func NewBaccaratInteractor(b interfaces.BaccaratGame, bp presenter.BaccaratPresenter) *BaccaratInteractorNewBaccaratInteractor コンストラクタ
### func RestoreBaccaratInteractor
func RestoreBaccaratInteractor(data []byte, bp presenter.BaccaratPresenter) (*BaccaratInteractor, error)RestoreBaccaratInteractor deserialises JSON into a BaccaratInteractor.
### func (*BaccaratInteractor) ActionLog
func (bi *BaccaratInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*BaccaratInteractor) Bet
func (bi *BaccaratInteractor) Bet(amount, betType, ppBet, bpBet int) stringBet ベット
### func (*BaccaratInteractor) ClearHistory
func (bi *BaccaratInteractor) ClearHistory() stringClearHistory 罫線履歴クリア
### func (*BaccaratInteractor) Reset
func (bi *BaccaratInteractor) Reset() stringReset ゲーム初期化
BaccaratInteractorIF バカラインタラクターインタフェース
type BaccaratInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Bet ベット
Bet(amount, betType, ppBet, bpBet int) string
// ClearHistory 罫線履歴クリア
ClearHistory() string
// ActionLog 棋譜を出力する
ActionLog() string
}BlackJackInteractor ブラックジャックインタラクタークラス
type BlackJackInteractor struct {
// contains filtered or unexported fields
}### func NewBlackJackInteractor
func NewBlackJackInteractor(bj interfaces.BlackJackGame, bjp presenter.BlackJackPresenter) *BlackJackInteractorNewBlackJackInteractor コンストラクタ
### func RestoreBlackJackInteractor
func RestoreBlackJackInteractor(data []byte, bjp presenter.BlackJackPresenter) (*BlackJackInteractor, error)RestoreBlackJackInteractor deserialises JSON into a BlackJackInteractor.
### func (*BlackJackInteractor) ActionLog
func (bi *BlackJackInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*BlackJackInteractor) Bet
func (bi *BlackJackInteractor) Bet(amount, ppBet, t3Bet, handCount int) stringBet ベット
### func (*BlackJackInteractor) DeclineEarlySurrender
func (bi *BlackJackInteractor) DeclineEarlySurrender() stringDeclineEarlySurrender アーリーサレンダー辞退
### func (*BlackJackInteractor) DeclineInsurance
func (bi *BlackJackInteractor) DeclineInsurance() stringDeclineInsurance インシュランス辞退
### func (*BlackJackInteractor) DoubleDown
func (bi *BlackJackInteractor) DoubleDown() stringDoubleDown ダブルダウン
### func (*BlackJackInteractor) EarlySurrender
func (bi *BlackJackInteractor) EarlySurrender() stringEarlySurrender アーリーサレンダー
### func (*BlackJackInteractor) Hit
func (bi *BlackJackInteractor) Hit() stringHit ヒット
### func (*BlackJackInteractor) Insurance
func (bi *BlackJackInteractor) Insurance() stringInsurance インシュランス
### func (*BlackJackInteractor) Reset
func (bi *BlackJackInteractor) Reset() stringReset ゲーム初期化
### func (*BlackJackInteractor) ResetWithConfig
func (bi *BlackJackInteractor) ResetWithConfig(cfg domain.BlackJackConfig) stringResetWithConfig 設定付きリセット
### func (*BlackJackInteractor) SetCountingSystem
func (bi *BlackJackInteractor) SetCountingSystem(system int) stringSetCountingSystem カウンティングシステム変更
### func (*BlackJackInteractor) SetCpuPlayerCount
func (bi *BlackJackInteractor) SetCpuPlayerCount(count int) stringSetCpuPlayerCount CPUプレイヤー数変更
### func (*BlackJackInteractor) SetDeckCount
func (bi *BlackJackInteractor) SetDeckCount(count int) stringSetDeckCount デッキ数設定
### func (*BlackJackInteractor) SetDeckPenetration
func (bi *BlackJackInteractor) SetDeckPenetration(penetration int) stringSetDeckPenetration デッキペネトレーション率設定
### func (*BlackJackInteractor) SetSurrenderRule
func (bi *BlackJackInteractor) SetSurrenderRule(rule int) stringSetSurrenderRule サレンダールール変更
### func (*BlackJackInteractor) Split
func (bi *BlackJackInteractor) Split() stringSplit スプリット
### func (*BlackJackInteractor) Stand
func (bi *BlackJackInteractor) Stand() stringStand スタンド
### func (*BlackJackInteractor) Surrender
func (bi *BlackJackInteractor) Surrender() stringSurrender サレンダー
### func (*BlackJackInteractor) ToggleCounting
func (bi *BlackJackInteractor) ToggleCounting() stringToggleCounting カウンティング表示切り替え
### func (*BlackJackInteractor) ToggleDAS
func (bi *BlackJackInteractor) ToggleDAS() stringToggleDAS スプリット後ダブルダウン許可切り替え
### func (*BlackJackInteractor) ToggleHint
func (bi *BlackJackInteractor) ToggleHint() stringToggleHint ヒント表示切り替え
### func (*BlackJackInteractor) ToggleSoft17
func (bi *BlackJackInteractor) ToggleSoft17() stringToggleSoft17 ソフト17ルール切り替え
BlackJackInteractorIF ブラックジャックインタラクターインタフェース
type BlackJackInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Hit ヒット
Hit() string
// Stand スタンド
Stand() string
// Bet ベット
Bet(amount, ppBet, t3Bet, handCount int) string
// DoubleDown ダブルダウン
DoubleDown() string
// Split スプリット
Split() string
// Insurance インシュランス
Insurance() string
// DeclineInsurance インシュランス辞退
DeclineInsurance() string
// Surrender サレンダー
Surrender() string
// EarlySurrender アーリーサレンダー
EarlySurrender() string
// DeclineEarlySurrender アーリーサレンダー辞退
DeclineEarlySurrender() string
// SetDeckCount デッキ数設定
SetDeckCount(count int) string
// ToggleHint ヒント表示切り替え
ToggleHint() string
// ToggleSoft17 ソフト17ルール切り替え
ToggleSoft17() string
// ToggleCounting カウンティング表示切り替え
ToggleCounting() string
// ToggleDAS スプリット後ダブルダウン許可切り替え
ToggleDAS() string
// SetCountingSystem カウンティングシステム変更
SetCountingSystem(system int) string
// SetDeckPenetration デッキペネトレーション率設定
SetDeckPenetration(penetration int) string
// SetCpuPlayerCount CPUプレイヤー数変更
SetCpuPlayerCount(count int) string
// SetSurrenderRule サレンダールール変更
SetSurrenderRule(rule int) string
// ResetWithConfig 設定付きリセット
ResetWithConfig(cfg domain.BlackJackConfig) string
// ActionLog 棋譜を出力する
ActionLog() string
}BridgeInteractor ブリッジインタラクタークラス
type BridgeInteractor struct {
// contains filtered or unexported fields
}func NewBridgeInteractor(b interfaces.BridgeGame, bp presenter.BridgePresenter) *BridgeInteractorNewBridgeInteractor コンストラクタ
### func RestoreBridgeInteractor
func RestoreBridgeInteractor(data []byte, bp presenter.BridgePresenter) (*BridgeInteractor, error)RestoreBridgeInteractor deserialises JSON into a BridgeInteractor.
### func (*BridgeInteractor) ActionLog
func (bi *BridgeInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*BridgeInteractor) Bid
func (bi *BridgeInteractor) Bid(bidType int, level int, suit int) stringBid ビッドする
### func (*BridgeInteractor) GetConfig
func (bi *BridgeInteractor) GetConfig() domain.BridgeConfigGetConfig 現在の設定を取得
### func (*BridgeInteractor) Hint
func (bi *BridgeInteractor) Hint() stringHint ヒント取得
### func (*BridgeInteractor) NextRound
func (bi *BridgeInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*BridgeInteractor) NextTrick
func (bi *BridgeInteractor) NextTrick() stringNextTrick トリックを解決して次のトリックへ進む
### func (*BridgeInteractor) Play
func (bi *BridgeInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*BridgeInteractor) Reset
func (bi *BridgeInteractor) Reset() stringReset ゲーム初期化
### func (*BridgeInteractor) ResetWithConfig
func (bi *BridgeInteractor) ResetWithConfig(cfg domain.BridgeConfig) stringResetWithConfig 設定を変更してゲーム初期化
BridgeInteractorIF ブリッジインタラクターインタフェース
type BridgeInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.BridgeConfig) string
// Bid ビッドする (bidType: 0=Pass, 1=Normal, 2=Double, 3=Redouble)
Bid(bidType int, level int, suit int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.BridgeConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}CanastaInteractor カナスタインタラクタークラス
type CanastaInteractor struct {
// contains filtered or unexported fields
}func NewCanastaInteractor(g interfaces.CanastaGame, gp presenter.CanastaPresenter) *CanastaInteractorNewCanastaInteractor コンストラクタ
### func RestoreCanastaInteractor
func RestoreCanastaInteractor(data []byte, gp presenter.CanastaPresenter) (*CanastaInteractor, error)RestoreCanastaInteractor deserialises JSON into a CanastaInteractor.
### func (*CanastaInteractor) ActionLog
func (ci *CanastaInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*CanastaInteractor) Discard
func (ci *CanastaInteractor) Discard(cardIndex int) stringDiscard カードを捨てる
### func (*CanastaInteractor) DrawFromDiscard
func (ci *CanastaInteractor) DrawFromDiscard(naturalPairIndices []int) stringDrawFromDiscard 捨て札の山を取る
### func (*CanastaInteractor) DrawFromStock
func (ci *CanastaInteractor) DrawFromStock() stringDrawFromStock 山札からカードを引く
### func (*CanastaInteractor) GetConfig
func (ci *CanastaInteractor) GetConfig() domain.CanastaConfigGetConfig 現在の設定を取得
### func (*CanastaInteractor) GoOut
func (ci *CanastaInteractor) GoOut() stringGoOut 上がる
### func (*CanastaInteractor) Meld
func (ci *CanastaInteractor) Meld(meldGroups [][]int) stringMeld メルドを出す
### func (*CanastaInteractor) NextRound
func (ci *CanastaInteractor) NextRound() stringNextRound 次のラウンドへ進む
### func (*CanastaInteractor) Reset
func (ci *CanastaInteractor) Reset() stringReset ゲーム初期化
### func (*CanastaInteractor) ResetWithConfig
func (ci *CanastaInteractor) ResetWithConfig(cfg domain.CanastaConfig) stringResetWithConfig 設定を変更してゲーム初期化
### func (*CanastaInteractor) SkipMeld
func (ci *CanastaInteractor) SkipMeld() stringSkipMeld メルドフェーズをスキップ
CanastaInteractorIF カナスタインタラクターインタフェース
type CanastaInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.CanastaConfig) string
// DrawFromStock 山札からカードを引く
DrawFromStock() string
// DrawFromDiscard 捨て札の山を取る
DrawFromDiscard(naturalPairIndices []int) string
// Meld メルドを出す
Meld(meldGroups [][]int) string
// SkipMeld メルドフェーズをスキップ
SkipMeld() string
// Discard カードを捨てる
Discard(cardIndex int) string
// GoOut 上がる
GoOut() string
// NextRound 次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.CanastaConfig
// ActionLog 棋譜を出力する
ActionLog() string
}## type ClockSolitaireInteractor
ClockSolitaireInteractor クロックソリティアインタラクタークラス
type ClockSolitaireInteractor struct {
// contains filtered or unexported fields
}### func NewClockSolitaireInteractor
func NewClockSolitaireInteractor(g interfaces.ClockSolitaireGame, p presenter.ClockSolitairePresenter) *ClockSolitaireInteractorNewClockSolitaireInteractor コンストラクタ
### func RestoreClockSolitaireInteractor
func RestoreClockSolitaireInteractor(data []byte, p presenter.ClockSolitairePresenter) (*ClockSolitaireInteractor, error)RestoreClockSolitaireInteractor deserialises JSON into a ClockSolitaireInteractor.
### func (*ClockSolitaireInteractor) ActionLog
func (ci *ClockSolitaireInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*ClockSolitaireInteractor) AutoPlay
func (ci *ClockSolitaireInteractor) AutoPlay() stringAutoPlay 自動プレイ
### func (*ClockSolitaireInteractor) Reset
func (ci *ClockSolitaireInteractor) Reset() stringReset ゲーム初期化
### func (*ClockSolitaireInteractor) Step
func (ci *ClockSolitaireInteractor) Step() stringStep 1ステップ実行
## type ClockSolitaireInteractorIF
ClockSolitaireInteractorIF クロックソリティアインタラクターインタフェース
type ClockSolitaireInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Step 1ステップ実行
Step() string
// AutoPlay 自動プレイ
AutoPlay() string
// ActionLog 棋譜を出力する
ActionLog() string
}CrazyEightsInteractor クレイジーエイトインタラクタークラス
type CrazyEightsInteractor struct {
// contains filtered or unexported fields
}### func NewCrazyEightsInteractor
func NewCrazyEightsInteractor(g interfaces.CrazyEightsGame, gp presenter.CrazyEightsPresenter) *CrazyEightsInteractorNewCrazyEightsInteractor コンストラクタ
### func RestoreCrazyEightsInteractor
func RestoreCrazyEightsInteractor(data []byte, gp presenter.CrazyEightsPresenter) (*CrazyEightsInteractor, error)RestoreCrazyEightsInteractor deserialises JSON into a CrazyEightsInteractor.
### func (*CrazyEightsInteractor) ActionLog
func (ci *CrazyEightsInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*CrazyEightsInteractor) ChooseSuit
func (ci *CrazyEightsInteractor) ChooseSuit(suit int) stringChooseSuit スートを選択 (8を出した後)
### func (*CrazyEightsInteractor) Draw
func (ci *CrazyEightsInteractor) Draw() stringDraw カードを引く
### func (*CrazyEightsInteractor) GetConfig
func (ci *CrazyEightsInteractor) GetConfig() domain.CrazyEightsConfigGetConfig 現在の設定を取得
### func (*CrazyEightsInteractor) NextRound
func (ci *CrazyEightsInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*CrazyEightsInteractor) Play
func (ci *CrazyEightsInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*CrazyEightsInteractor) Reset
func (ci *CrazyEightsInteractor) Reset() stringReset ゲーム初期化
### func (*CrazyEightsInteractor) ResetWithConfig
func (ci *CrazyEightsInteractor) ResetWithConfig(cfg domain.CrazyEightsConfig) stringResetWithConfig 設定を変更してゲーム初期化
## type CrazyEightsInteractorIF
CrazyEightsInteractorIF クレイジーエイトインタラクターインタフェース
type CrazyEightsInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.CrazyEightsConfig) string
// Play カードをプレイ
Play(cardIndex int) string
// ChooseSuit スートを選択 (8を出した後)
ChooseSuit(suit int) string
// Draw カードを引く
Draw() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.CrazyEightsConfig
// ActionLog 棋譜を出力する
ActionLog() string
}CribbageInteractor クリベッジインタラクタークラス
type CribbageInteractor struct {
// contains filtered or unexported fields
}### func NewCribbageInteractor
func NewCribbageInteractor(g interfaces.CribbageGame, gp presenter.CribbagePresenter) *CribbageInteractorNewCribbageInteractor コンストラクタ
### func RestoreCribbageInteractor
func RestoreCribbageInteractor(data []byte, gp presenter.CribbagePresenter) (*CribbageInteractor, error)RestoreCribbageInteractor deserialises JSON into a CribbageInteractor.
### func (*CribbageInteractor) ActionLog
func (ci *CribbageInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*CribbageInteractor) Discard
func (ci *CribbageInteractor) Discard(cardIndices []int) stringDiscard クリブに2枚捨てる
### func (*CribbageInteractor) GetConfig
func (ci *CribbageInteractor) GetConfig() domain.CribbageConfigGetConfig 現在の設定を取得
### func (*CribbageInteractor) Go
func (ci *CribbageInteractor) Go() stringGo Goを宣言する
### func (*CribbageInteractor) NextRound
func (ci *CribbageInteractor) NextRound() stringNextRound 次のラウンドへ進む
### func (*CribbageInteractor) Peg
func (ci *CribbageInteractor) Peg(cardIndex int) stringPeg ペギングでカードを出す
### func (*CribbageInteractor) Reset
func (ci *CribbageInteractor) Reset() stringReset ゲーム初期化
### func (*CribbageInteractor) ResetWithConfig
func (ci *CribbageInteractor) ResetWithConfig(cfg domain.CribbageConfig) stringResetWithConfig 設定を変更してゲーム初期化
### func (*CribbageInteractor) ShowNext
func (ci *CribbageInteractor) ShowNext() stringShowNext ショーフェーズの次のスコア計算
CribbageInteractorIF クリベッジインタラクターインタフェース
type CribbageInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.CribbageConfig) string
// Discard クリブに2枚捨てる
Discard(cardIndices []int) string
// Peg ペギングでカードを出す
Peg(cardIndex int) string
// Go Goを宣言する
Go() string
// ShowNext ショーフェーズの次のスコア計算
ShowNext() string
// NextRound 次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.CribbageConfig
// ActionLog 棋譜を出力する
ActionLog() string
}DaifugoInteractor 大富豪インタラクタークラス
type DaifugoInteractor struct {
// contains filtered or unexported fields
}func NewDaifugoInteractor(dg interfaces.DaifugoGame, dgp presenter.DaifugoPresenter) *DaifugoInteractorNewDaifugoInteractor コンストラクタ
### func RestoreDaifugoInteractor
func RestoreDaifugoInteractor(data []byte, dgp presenter.DaifugoPresenter) (*DaifugoInteractor, error)RestoreDaifugoInteractor deserialises JSON into a DaifugoInteractor.
### func (*DaifugoInteractor) ActionLog
func (di *DaifugoInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*DaifugoInteractor) GetConfig
func (di *DaifugoInteractor) GetConfig() domain.DaifugoConfigGetConfig 現在の設定を返す
### func (*DaifugoInteractor) Play
func (di *DaifugoInteractor) Play(indices []int) stringPlay 人間プレイヤーがカードを出す (または パスする) indices: 出すカードのインデックス。空の場合はパス。
### func (*DaifugoInteractor) Reset
func (di *DaifugoInteractor) Reset() stringReset ゲーム初期化
### func (*DaifugoInteractor) ResetWithConfig
func (di *DaifugoInteractor) ResetWithConfig(config domain.DaifugoConfig) stringResetWithConfig 設定を変更してゲームを初期化
### func (*DaifugoInteractor) Sort
func (di *DaifugoInteractor) Sort(mode domain.DaifugoSortMode) stringSort 手札ソートモードを変更
DaifugoInteractorIF 大富豪インタラクターインタフェース
type DaifugoInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Play 人間プレイヤーがカードを出す (または パスする)
Play(indices []int) string
// ResetWithConfig 設定を変更してゲームを初期化
ResetWithConfig(config domain.DaifugoConfig) string
// GetConfig 現在の設定を返す
GetConfig() domain.DaifugoConfig
// Sort 手札ソートモードを変更
Sort(mode domain.DaifugoSortMode) string
// ActionLog 棋譜を出力する
ActionLog() string
}DoubtInteractor ダウトインタラクタークラス
type DoubtInteractor struct {
// contains filtered or unexported fields
}func NewDoubtInteractor(d interfaces.DoubtGame, dp presenter.DoubtPresenter) *DoubtInteractorNewDoubtInteractor コンストラクタ
### func RestoreDoubtInteractor
func RestoreDoubtInteractor(data []byte, dp presenter.DoubtPresenter) (*DoubtInteractor, error)RestoreDoubtInteractor deserialises JSON into a DoubtInteractor.
### func (*DoubtInteractor) ActionLog
func (di *DoubtInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*DoubtInteractor) GetConfig
func (di *DoubtInteractor) GetConfig() domain.DoubtConfigGetConfig 現在の設定を取得
### func (*DoubtInteractor) GetCpuDoubters
func (di *DoubtInteractor) GetCpuDoubters() []intGetCpuDoubters CPUダウターインデックスリスト取得
### func (*DoubtInteractor) Play
func (di *DoubtInteractor) Play(cardIndices []int, claimedValue int, humanPlayMs int) stringPlay 人間プレイヤーがカードを出す
### func (*DoubtInteractor) Reset
func (di *DoubtInteractor) Reset() stringReset ゲーム初期化
### func (*DoubtInteractor) ResetProfile
func (di *DoubtInteractor) ResetProfile() stringResetProfile メタAIプロファイルをリセット
### func (*DoubtInteractor) ResetWithConfig
func (di *DoubtInteractor) ResetWithConfig(cfg domain.DoubtConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
### func (*DoubtInteractor) ResolveDoubt
func (di *DoubtInteractor) ResolveDoubt(doubterIndices []int) stringResolveDoubt ダウト解決 (ダウトした人が正しかったか判定)
### func (*DoubtInteractor) SkipDoubt
func (di *DoubtInteractor) SkipDoubt() stringSkipDoubt ダウトをスキップ (誰もダウトしなかった)
DoubtInteractorIF ダウトインタラクターインタフェース
type DoubtInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.DoubtConfig, profileData []byte) string
// Play 人間プレイヤーがカードを出す
Play(cardIndices []int, claimedValue int, humanPlayMs int) string
// ResolveDoubt ダウト解決
ResolveDoubt(doubterIndices []int) string
// SkipDoubt ダウトをスキップ
SkipDoubt() string
// GetCpuDoubters CPUダウターインデックスリスト取得
GetCpuDoubters() []int
// GetConfig 現在の設定を取得
GetConfig() domain.DoubtConfig
// ResetProfile メタAIプロファイルをリセット
ResetProfile() string
// ActionLog 棋譜を出力する
ActionLog() string
}EuchreInteractor ユーカーインタラクタークラス
type EuchreInteractor struct {
// contains filtered or unexported fields
}func NewEuchreInteractor(e interfaces.EuchreGame, ep presenter.EuchrePresenter) *EuchreInteractorNewEuchreInteractor コンストラクタ
### func RestoreEuchreInteractor
func RestoreEuchreInteractor(data []byte, ep presenter.EuchrePresenter) (*EuchreInteractor, error)RestoreEuchreInteractor deserialises JSON into an EuchreInteractor.
### func (*EuchreInteractor) ActionLog
func (ei *EuchreInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*EuchreInteractor) CallTrump
func (ei *EuchreInteractor) CallTrump(suit int, goAlone bool) stringCallTrump スートを指名する
### func (*EuchreInteractor) Discard
func (ei *EuchreInteractor) Discard(cardIndex int) stringDiscard カードを捨てる
### func (*EuchreInteractor) GetConfig
func (ei *EuchreInteractor) GetConfig() domain.EuchreConfigGetConfig 現在の設定を取得
### func (*EuchreInteractor) Hint
func (ei *EuchreInteractor) Hint() stringHint ヒント取得
### func (*EuchreInteractor) NextRound
func (ei *EuchreInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*EuchreInteractor) NextTrick
func (ei *EuchreInteractor) NextTrick() stringNextTrick トリックを解決して次のトリックへ進む
### func (*EuchreInteractor) Pass
func (ei *EuchreInteractor) Pass() stringPass 現在のフェーズに応じてパスする (PickUp → PickUp(false,false), CallTrump → PassCall)
### func (*EuchreInteractor) PassCall
func (ei *EuchreInteractor) PassCall() stringPassCall コールフェーズでパスする
### func (*EuchreInteractor) PickUp
func (ei *EuchreInteractor) PickUp(orderUp bool, goAlone bool) stringPickUp ピックアップ判断
### func (*EuchreInteractor) Play
func (ei *EuchreInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*EuchreInteractor) Reset
func (ei *EuchreInteractor) Reset() stringReset ゲーム初期化
### func (*EuchreInteractor) ResetWithConfig
func (ei *EuchreInteractor) ResetWithConfig(cfg domain.EuchreConfig) stringResetWithConfig 設定を変更してゲーム初期化
EuchreInteractorIF ユーカーインタラクターインタフェース
type EuchreInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.EuchreConfig) string
// PickUp ピックアップ判断 (orderUp=true で指名, goAlone=true でゴーアローン)
PickUp(orderUp bool, goAlone bool) string
// CallTrump スートを指名する
CallTrump(suit int, goAlone bool) string
// Pass 現在のフェーズに応じてパスする (PickUp or CallTrump)
Pass() string
// PassCall コールフェーズでパスする
PassCall() string
// Discard カードを捨てる
Discard(cardIndex int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.EuchreConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}FreeCellInteractor フリーセルインタラクタークラス
type FreeCellInteractor struct {
// contains filtered or unexported fields
}### func NewFreeCellInteractor
func NewFreeCellInteractor(f interfaces.FreeCellGame, fp presenter.FreeCellPresenter) *FreeCellInteractorNewFreeCellInteractor コンストラクタ
### func RestoreFreeCellInteractor
func RestoreFreeCellInteractor(data []byte, fp presenter.FreeCellPresenter) (*FreeCellInteractor, error)RestoreFreeCellInteractor deserialises JSON into a FreeCellInteractor.
### func (*FreeCellInteractor) ActionLog
func (fi *FreeCellInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*FreeCellInteractor) AutoComplete
func (fi *FreeCellInteractor) AutoComplete() stringAutoComplete オートコンプリート
### func (*FreeCellInteractor) GiveUp
func (fi *FreeCellInteractor) GiveUp() stringGiveUp ギブアップ
### func (*FreeCellInteractor) Hint
func (fi *FreeCellInteractor) Hint() stringHint ヒント取得
### func (*FreeCellInteractor) MoveFreeCellToFoundation
func (fi *FreeCellInteractor) MoveFreeCellToFoundation(cell int) stringMoveFreeCellToFoundation フリーセルからファンデーションにカードを移動
### func (*FreeCellInteractor) MoveFreeCellToTableau
func (fi *FreeCellInteractor) MoveFreeCellToTableau(cell, col int) stringMoveFreeCellToTableau フリーセルからタブローにカードを移動
### func (*FreeCellInteractor) MoveTableauToFoundation
func (fi *FreeCellInteractor) MoveTableauToFoundation(col int) stringMoveTableauToFoundation タブローからファンデーションにカードを移動
### func (*FreeCellInteractor) MoveTableauToFreeCell
func (fi *FreeCellInteractor) MoveTableauToFreeCell(col, cell int) stringMoveTableauToFreeCell タブローからフリーセルにカードを移動
### func (*FreeCellInteractor) MoveTableauToTableau
func (fi *FreeCellInteractor) MoveTableauToTableau(fromCol, cardIndex, toCol int) stringMoveTableauToTableau タブローからタブローにカードを移動
### func (*FreeCellInteractor) Reset
func (fi *FreeCellInteractor) Reset() stringReset ゲーム初期化
### func (*FreeCellInteractor) Undo
func (fi *FreeCellInteractor) Undo() stringUndo アンドゥ
### func (*FreeCellInteractor) UndoN
func (fi *FreeCellInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
FreeCellInteractorIF フリーセルインタラクターインタフェース
type FreeCellInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// MoveTableauToTableau タブローからタブローにカードを移動
MoveTableauToTableau(fromCol, cardIndex, toCol int) string
// MoveTableauToFoundation タブローからファンデーションにカードを移動
MoveTableauToFoundation(col int) string
// MoveTableauToFreeCell タブローからフリーセルにカードを移動
MoveTableauToFreeCell(col, cell int) string
// MoveFreeCellToTableau フリーセルからタブローにカードを移動
MoveFreeCellToTableau(cell, col int) string
// MoveFreeCellToFoundation フリーセルからファンデーションにカードを移動
MoveFreeCellToFoundation(cell int) string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// AutoComplete オートコンプリート
AutoComplete() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}GameBase provides common functionality for all game interactors. Embed this struct to inherit the Snapshot method.
type GameBase[G any] struct {
Game G
}### func (*GameBase[G]) Snapshot
func (b *GameBase[G]) Snapshot() ([]byte, error)Snapshot serialises the game state to JSON for KV persistence.
GinRummyInteractor ジンラミーインタラクタークラス
type GinRummyInteractor struct {
// contains filtered or unexported fields
}### func NewGinRummyInteractor
func NewGinRummyInteractor(g interfaces.GinRummyGame, gp presenter.GinRummyPresenter) *GinRummyInteractorNewGinRummyInteractor コンストラクタ
### func RestoreGinRummyInteractor
func RestoreGinRummyInteractor(data []byte, gp presenter.GinRummyPresenter) (*GinRummyInteractor, error)RestoreGinRummyInteractor deserialises JSON into a GinRummyInteractor.
### func (*GinRummyInteractor) ActionLog
func (ci *GinRummyInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*GinRummyInteractor) Discard
func (ci *GinRummyInteractor) Discard(cardIndex int) stringDiscard カードを捨てる
### func (*GinRummyInteractor) DrawFromDiscard
func (ci *GinRummyInteractor) DrawFromDiscard() stringDrawFromDiscard 捨て札からカードを引く
### func (*GinRummyInteractor) DrawFromStock
func (ci *GinRummyInteractor) DrawFromStock() stringDrawFromStock 山札からカードを引く
### func (*GinRummyInteractor) GetConfig
func (ci *GinRummyInteractor) GetConfig() domain.GinRummyConfigGetConfig 現在の設定を取得
### func (*GinRummyInteractor) Knock
func (ci *GinRummyInteractor) Knock(cardIndex int) stringKnock ノックする
### func (*GinRummyInteractor) Layoff
func (ci *GinRummyInteractor) Layoff(cardIndices []int) stringLayoff レイオフする
### func (*GinRummyInteractor) NextRound
func (ci *GinRummyInteractor) NextRound() stringNextRound 次のラウンドへ進む
### func (*GinRummyInteractor) Reset
func (ci *GinRummyInteractor) Reset() stringReset ゲーム初期化
### func (*GinRummyInteractor) ResetWithConfig
func (ci *GinRummyInteractor) ResetWithConfig(cfg domain.GinRummyConfig) stringResetWithConfig 設定を変更してゲーム初期化
GinRummyInteractorIF ジンラミーインタラクターインタフェース
type GinRummyInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.GinRummyConfig) string
// DrawFromStock 山札からカードを引く
DrawFromStock() string
// DrawFromDiscard 捨て札からカードを引く
DrawFromDiscard() string
// Discard カードを捨てる
Discard(cardIndex int) string
// Knock ノックする
Knock(cardIndex int) string
// Layoff レイオフする
Layoff(cardIndices []int) string
// NextRound 次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.GinRummyConfig
// ActionLog 棋譜を出力する
ActionLog() string
}GoFishInteractor Go Fishインタラクタークラス
type GoFishInteractor struct {
// contains filtered or unexported fields
}func NewGoFishInteractor(gf interfaces.GoFishGame, gfp presenter.GoFishPresenter) *GoFishInteractorNewGoFishInteractor コンストラクタ
### func RestoreGoFishInteractor
func RestoreGoFishInteractor(data []byte, gfp presenter.GoFishPresenter) (*GoFishInteractor, error)RestoreGoFishInteractor deserialises JSON into a GoFishInteractor.
### func (*GoFishInteractor) ActionLog
func (gi *GoFishInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*GoFishInteractor) Ask
func (gi *GoFishInteractor) Ask(targetIdx, rank int) stringAsk 人間プレイヤーが相手にランクを要求する
### func (*GoFishInteractor) GetConfig
func (gi *GoFishInteractor) GetConfig() domain.GoFishConfigGetConfig 現在の設定を返す
### func (*GoFishInteractor) Reset
func (gi *GoFishInteractor) Reset(config domain.GoFishConfig) stringReset ゲーム初期化
GoFishInteractorIF Go Fishインタラクターインタフェース
type GoFishInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset(config domain.GoFishConfig) string
// GetConfig 現在の設定を返す
GetConfig() domain.GoFishConfig
// Ask 人間プレイヤーが相手にランクを要求する
Ask(targetIdx, rank int) string
// ActionLog 棋譜を出力する
ActionLog() string
}GolfInteractor ゴルフソリティアインタラクタークラス
type GolfInteractor struct {
// contains filtered or unexported fields
}func NewGolfInteractor(g interfaces.GolfGame, gp presenter.GolfPresenter) *GolfInteractorNewGolfInteractor コンストラクタ
### func RestoreGolfInteractor
func RestoreGolfInteractor(data []byte, gp presenter.GolfPresenter) (*GolfInteractor, error)RestoreGolfInteractor deserialises JSON into a GolfInteractor.
### func (*GolfInteractor) ActionLog
func (gi *GolfInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*GolfInteractor) Draw
func (gi *GolfInteractor) Draw() stringDraw ストックからウェイストにカードを引く
### func (*GolfInteractor) GiveUp
func (gi *GolfInteractor) GiveUp() stringGiveUp ギブアップ
### func (*GolfInteractor) Hint
func (gi *GolfInteractor) Hint() stringHint ヒント取得
### func (*GolfInteractor) Remove
func (gi *GolfInteractor) Remove(col int) stringRemove タブローのカードを除去
### func (*GolfInteractor) Reset
func (gi *GolfInteractor) Reset() stringReset ゲーム初期化
### func (*GolfInteractor) Undo
func (gi *GolfInteractor) Undo() stringUndo アンドゥ
### func (*GolfInteractor) UndoN
func (gi *GolfInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
GolfInteractorIF ゴルフソリティアインタラクターインタフェース
type GolfInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Draw ストックからウェイストにカードを引く
Draw() string
// Remove タブローのカードを除去
Remove(col int) string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}HeartsInteractor ハーツインタラクタークラス
type HeartsInteractor struct {
// contains filtered or unexported fields
}func NewHeartsInteractor(h interfaces.HeartsGame, hp presenter.HeartsPresenter) *HeartsInteractorNewHeartsInteractor コンストラクタ
### func RestoreHeartsInteractor
func RestoreHeartsInteractor(data []byte, hp presenter.HeartsPresenter) (*HeartsInteractor, error)RestoreHeartsInteractor deserialises JSON into a HeartsInteractor.
### func (*HeartsInteractor) ActionLog
func (hi *HeartsInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*HeartsInteractor) GetConfig
func (hi *HeartsInteractor) GetConfig() domain.HeartsConfigGetConfig 現在の設定を取得
### func (*HeartsInteractor) Hint
func (hi *HeartsInteractor) Hint() stringHint ヒント取得
### func (*HeartsInteractor) NextRound
func (hi *HeartsInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*HeartsInteractor) NextTrick
func (hi *HeartsInteractor) NextTrick() stringNextTrick 次のトリックへ進む
### func (*HeartsInteractor) Pass
func (hi *HeartsInteractor) Pass(cardIndices []int) stringPass カード交換
### func (*HeartsInteractor) Play
func (hi *HeartsInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*HeartsInteractor) Reset
func (hi *HeartsInteractor) Reset() stringReset ゲーム初期化
### func (*HeartsInteractor) ResetWithConfig
func (hi *HeartsInteractor) ResetWithConfig(cfg domain.HeartsConfig) stringResetWithConfig 設定を変更してゲーム初期化
HeartsInteractorIF ハーツインタラクターインタフェース
type HeartsInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.HeartsConfig) string
// Pass カード交換
Pass(cardIndices []int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.HeartsConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}HoldemInteractor テキサスホールデムインタラクタークラス
type HoldemInteractor struct {
// contains filtered or unexported fields
}func NewHoldemInteractor(h interfaces.HoldemGame, hp presenter.HoldemPresenter) *HoldemInteractorNewHoldemInteractor コンストラクタ
### func RestoreHoldemInteractor
func RestoreHoldemInteractor(data []byte, hp presenter.HoldemPresenter) (*HoldemInteractor, error)RestoreHoldemInteractor deserialises JSON into a HoldemInteractor.
### func (*HoldemInteractor) Action
func (hi *HoldemInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*HoldemInteractor) ActionLog
func (hi *HoldemInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*HoldemInteractor) GetConfig
func (hi *HoldemInteractor) GetConfig() domain.HoldemConfigGetConfig 現在の設定を取得
### func (*HoldemInteractor) Reset
func (hi *HoldemInteractor) Reset() stringReset ゲーム初期化
### func (*HoldemInteractor) ResetWithConfig
func (hi *HoldemInteractor) ResetWithConfig(cfg domain.HoldemConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
HoldemInteractorIF テキサスホールデムインタラクターインタフェース
type HoldemInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
TournamentInteractorIF
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.HoldemConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// GetConfig 現在の設定を取得
GetConfig() domain.HoldemConfig
// ActionLog 棋譜を出力する
ActionLog() string
}IndianPokerInteractor インディアンポーカーインタラクタークラス
type IndianPokerInteractor struct {
// contains filtered or unexported fields
}### func NewIndianPokerInteractor
func NewIndianPokerInteractor(ip interfaces.IndianPokerGame, ipp presenter.IndianPokerPresenter) *IndianPokerInteractorNewIndianPokerInteractor コンストラクタ
### func RestoreIndianPokerInteractor
func RestoreIndianPokerInteractor(data []byte, ipp presenter.IndianPokerPresenter) (*IndianPokerInteractor, error)RestoreIndianPokerInteractor deserialises JSON into an IndianPokerInteractor.
### func (*IndianPokerInteractor) Action
func (ipi *IndianPokerInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*IndianPokerInteractor) ActionLog
func (ipi *IndianPokerInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*IndianPokerInteractor) GetConfig
func (ipi *IndianPokerInteractor) GetConfig() domain.IndianPokerConfigGetConfig 現在の設定を取得
### func (*IndianPokerInteractor) Reset
func (ipi *IndianPokerInteractor) Reset() stringReset ゲーム初期化
### func (*IndianPokerInteractor) ResetWithConfig
func (ipi *IndianPokerInteractor) ResetWithConfig(cfg domain.IndianPokerConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
## type IndianPokerInteractorIF
IndianPokerInteractorIF インディアンポーカーインタラクターインタフェース
type IndianPokerInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.IndianPokerConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// GetConfig 現在の設定を取得
GetConfig() domain.IndianPokerConfig
// ActionLog 棋譜を出力する
ActionLog() string
}KlondikeInteractor クロンダイクインタラクタークラス
type KlondikeInteractor struct {
// contains filtered or unexported fields
}### func NewKlondikeInteractor
func NewKlondikeInteractor(k interfaces.KlondikeGame, kp presenter.KlondikePresenter) *KlondikeInteractorNewKlondikeInteractor コンストラクタ
### func RestoreKlondikeInteractor
func RestoreKlondikeInteractor(data []byte, kp presenter.KlondikePresenter) (*KlondikeInteractor, error)RestoreKlondikeInteractor deserialises JSON into a KlondikeInteractor.
### func (*KlondikeInteractor) ActionLog
func (ki *KlondikeInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*KlondikeInteractor) AutoComplete
func (ki *KlondikeInteractor) AutoComplete() stringAutoComplete オートコンプリート
### func (*KlondikeInteractor) Draw
func (ki *KlondikeInteractor) Draw() stringDraw ストックからウェイストにカードを引く
### func (*KlondikeInteractor) GiveUp
func (ki *KlondikeInteractor) GiveUp() stringGiveUp ギブアップ
### func (*KlondikeInteractor) Hint
func (ki *KlondikeInteractor) Hint() stringHint ヒント取得
### func (*KlondikeInteractor) MoveTableauToFoundation
func (ki *KlondikeInteractor) MoveTableauToFoundation(col int) stringMoveTableauToFoundation タブローからファンデーションにカードを移動
### func (*KlondikeInteractor) MoveTableauToTableau
func (ki *KlondikeInteractor) MoveTableauToTableau(fromCol, cardIndex, toCol int) stringMoveTableauToTableau タブローからタブローにカードを移動
### func (*KlondikeInteractor) MoveWasteToFoundation
func (ki *KlondikeInteractor) MoveWasteToFoundation() stringMoveWasteToFoundation ウェイストからファンデーションにカードを移動
### func (*KlondikeInteractor) MoveWasteToTableau
func (ki *KlondikeInteractor) MoveWasteToTableau(col int) stringMoveWasteToTableau ウェイストからタブローにカードを移動
### func (*KlondikeInteractor) Reset
func (ki *KlondikeInteractor) Reset() stringReset ゲーム初期化
### func (*KlondikeInteractor) ResetWithConfig
func (ki *KlondikeInteractor) ResetWithConfig(cfg domain.KlondikeConfig) stringResetWithConfig 設定付きリセット
### func (*KlondikeInteractor) Undo
func (ki *KlondikeInteractor) Undo() stringUndo アンドゥ
### func (*KlondikeInteractor) UndoN
func (ki *KlondikeInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
KlondikeInteractorIF クロンダイクインタラクターインタフェース
type KlondikeInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定付きリセット
ResetWithConfig(cfg domain.KlondikeConfig) string
// Draw ストックからウェイストにカードを引く
Draw() string
// MoveWasteToTableau ウェイストからタブローにカードを移動
MoveWasteToTableau(col int) string
// MoveWasteToFoundation ウェイストからファンデーションにカードを移動
MoveWasteToFoundation() string
// MoveTableauToTableau タブローからタブローにカードを移動
MoveTableauToTableau(fromCol, cardIndex, toCol int) string
// MoveTableauToFoundation タブローからファンデーションにカードを移動
MoveTableauToFoundation(col int) string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// AutoComplete オートコンプリート
AutoComplete() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}MemoryInteractor 神経衰弱インタラクタークラス
type MemoryInteractor struct {
// contains filtered or unexported fields
}func NewMemoryInteractor(m interfaces.MemoryGame, mp presenter.MemoryPresenter) *MemoryInteractorNewMemoryInteractor コンストラクタ
### func RestoreMemoryInteractor
func RestoreMemoryInteractor(data []byte, mp presenter.MemoryPresenter) (*MemoryInteractor, error)RestoreMemoryInteractor deserialises JSON into a MemoryInteractor.
### func (*MemoryInteractor) ActionLog
func (mi *MemoryInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*MemoryInteractor) Flip
func (mi *MemoryInteractor) Flip(pos int) stringFlip カードをめくる
### func (*MemoryInteractor) GetConfig
func (mi *MemoryInteractor) GetConfig() domain.MemoryConfigGetConfig 現在の設定を取得
### func (*MemoryInteractor) Next
func (mi *MemoryInteractor) Next() stringNext 結果を解決し、CPU ターンを実行する
### func (*MemoryInteractor) Reset
func (mi *MemoryInteractor) Reset() stringReset ゲーム初期化
### func (*MemoryInteractor) ResetWithConfig
func (mi *MemoryInteractor) ResetWithConfig(cfg domain.MemoryConfig) stringResetWithConfig 設定を変更してゲーム初期化
MemoryInteractorIF 神経衰弱インタラクターインタフェース
type MemoryInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.MemoryConfig) string
// Flip カードをめくる
Flip(pos int) string
// Next 結果を解決し、CPUターンを実行する
Next() string
// GetConfig 現在の設定を取得
GetConfig() domain.MemoryConfig
// ActionLog 棋譜を出力する
ActionLog() string
}NapoleonInteractor ナポレオンインタラクタークラス
type NapoleonInteractor struct {
// contains filtered or unexported fields
}### func NewNapoleonInteractor
func NewNapoleonInteractor(n interfaces.NapoleonGame, np presenter.NapoleonPresenter) *NapoleonInteractorNewNapoleonInteractor コンストラクタ
### func RestoreNapoleonInteractor
func RestoreNapoleonInteractor(data []byte, np presenter.NapoleonPresenter) (*NapoleonInteractor, error)RestoreNapoleonInteractor deserialises JSON into a NapoleonInteractor.
### func (*NapoleonInteractor) ActionLog
func (ni *NapoleonInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*NapoleonInteractor) Bid
func (ni *NapoleonInteractor) Bid(bid int) stringBid ビッドを宣言
### func (*NapoleonInteractor) DeclareTrump
func (ni *NapoleonInteractor) DeclareTrump(suit int, adjSuit int, adjVal int) stringDeclareTrump 切り札と副官を宣言
### func (*NapoleonInteractor) ExchangeKitty
func (ni *NapoleonInteractor) ExchangeKitty(discardIndex int) stringExchangeKitty 場札を交換
### func (*NapoleonInteractor) GetConfig
func (ni *NapoleonInteractor) GetConfig() domain.NapoleonConfigGetConfig 現在の設定を取得
### func (*NapoleonInteractor) Hint
func (ni *NapoleonInteractor) Hint() stringHint ヒント取得
### func (*NapoleonInteractor) NextRound
func (ni *NapoleonInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*NapoleonInteractor) NextTrick
func (ni *NapoleonInteractor) NextTrick() stringNextTrick 次のトリックへ進む
### func (*NapoleonInteractor) Play
func (ni *NapoleonInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*NapoleonInteractor) Reset
func (ni *NapoleonInteractor) Reset() stringReset ゲーム初期化
### func (*NapoleonInteractor) ResetWithConfig
func (ni *NapoleonInteractor) ResetWithConfig(cfg domain.NapoleonConfig) stringResetWithConfig 設定を変更してゲーム初期化
NapoleonInteractorIF ナポレオンインタラクターインタフェース
type NapoleonInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.NapoleonConfig) string
// Bid ビッドを宣言
Bid(bid int) string
// DeclareTrump 切り札と副官を宣言
DeclareTrump(suit int, adjSuit int, adjVal int) string
// ExchangeKitty 場札を交換
ExchangeKitty(discardIndex int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.NapoleonConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}OhHellInteractor オー・ヘルインタラクタークラス
type OhHellInteractor struct {
// contains filtered or unexported fields
}func NewOhHellInteractor(o interfaces.OhHellGame, op presenter.OhHellPresenter) *OhHellInteractorNewOhHellInteractor コンストラクタ
### func RestoreOhHellInteractor
func RestoreOhHellInteractor(data []byte, op presenter.OhHellPresenter) (*OhHellInteractor, error)RestoreOhHellInteractor deserialises JSON into an OhHellInteractor.
### func (*OhHellInteractor) ActionLog
func (oi *OhHellInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*OhHellInteractor) Bid
func (oi *OhHellInteractor) Bid(bid int) stringBid ビッドを宣言
### func (*OhHellInteractor) GetConfig
func (oi *OhHellInteractor) GetConfig() domain.OhHellConfigGetConfig 現在の設定を取得
### func (*OhHellInteractor) Hint
func (oi *OhHellInteractor) Hint() stringHint ヒント取得
### func (*OhHellInteractor) NextRound
func (oi *OhHellInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*OhHellInteractor) NextTrick
func (oi *OhHellInteractor) NextTrick() stringNextTrick 次のトリックへ進む
### func (*OhHellInteractor) Play
func (oi *OhHellInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*OhHellInteractor) Reset
func (oi *OhHellInteractor) Reset() stringReset ゲーム初期化
### func (*OhHellInteractor) ResetWithConfig
func (oi *OhHellInteractor) ResetWithConfig(cfg domain.OhHellConfig) stringResetWithConfig 設定を変更してゲーム初期化
OhHellInteractorIF オー・ヘルインタラクターインタフェース
type OhHellInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.OhHellConfig) string
// Bid ビッドを宣言
Bid(bid int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.OhHellConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}OldMaidInteractor ババ抜きインタラクタークラス
type OldMaidInteractor struct {
// contains filtered or unexported fields
}func NewOldMaidInteractor(om interfaces.OldMaidGame, omp presenter.OldMaidPresenter) *OldMaidInteractorNewOldMaidInteractor コンストラクタ
### func RestoreOldMaidInteractor
func RestoreOldMaidInteractor(data []byte, omp presenter.OldMaidPresenter) (*OldMaidInteractor, error)RestoreOldMaidInteractor deserialises JSON into an OldMaidInteractor.
### func (*OldMaidInteractor) ActionLog
func (oi *OldMaidInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*OldMaidInteractor) Draw
func (oi *OldMaidInteractor) Draw(cardIdx int) stringDraw 人間プレイヤーがカードを引く cardIdx: 引くカードのインデックス。-1 の場合はランダム選択。
### func (*OldMaidInteractor) GetConfig
func (oi *OldMaidInteractor) GetConfig() domain.OldMaidConfigGetConfig 現在の設定を返す
### func (*OldMaidInteractor) Reorder
func (oi *OldMaidInteractor) Reorder(indices []int) stringReorder 人間プレイヤーの手札を並び替える
### func (*OldMaidInteractor) Reset
func (oi *OldMaidInteractor) Reset(config domain.OldMaidConfig, profileData []byte) stringReset ゲーム初期化
### func (*OldMaidInteractor) ResetProfile
func (oi *OldMaidInteractor) ResetProfile() stringResetProfile メタAIプロファイルをリセット
### func (*OldMaidInteractor) Shuffle
func (oi *OldMaidInteractor) Shuffle() stringShuffle 人間プレイヤーの手札をシャッフルする
OldMaidInteractorIF ババ抜きインタラクターインタフェース
type OldMaidInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
Reset(config domain.OldMaidConfig, profileData []byte) string
// GetConfig 現在の設定を返す
GetConfig() domain.OldMaidConfig
// Draw 人間プレイヤーがカードを引く
Draw(cardIdx int) string
// Shuffle 人間プレイヤーの手札をシャッフルする
Shuffle() string
// Reorder 人間プレイヤーの手札を並び替える
Reorder(indices []int) string
// ResetProfile メタAIプロファイルをリセット
ResetProfile() string
// ActionLog 棋譜を出力する
ActionLog() string
}OmahaInteractor オマハホールデムインタラクタークラス
type OmahaInteractor struct {
// contains filtered or unexported fields
}func NewOmahaInteractor(o interfaces.OmahaGame, op presenter.OmahaPresenter) *OmahaInteractorNewOmahaInteractor コンストラクタ
### func RestoreOmahaInteractor
func RestoreOmahaInteractor(data []byte, op presenter.OmahaPresenter) (*OmahaInteractor, error)RestoreOmahaInteractor deserialises JSON into an OmahaInteractor.
### func (*OmahaInteractor) Action
func (oi *OmahaInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*OmahaInteractor) ActionLog
func (oi *OmahaInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*OmahaInteractor) GetConfig
func (oi *OmahaInteractor) GetConfig() domain.OmahaConfigGetConfig 現在の設定を取得
### func (*OmahaInteractor) Reset
func (oi *OmahaInteractor) Reset() stringReset ゲーム初期化
### func (*OmahaInteractor) ResetWithConfig
func (oi *OmahaInteractor) ResetWithConfig(cfg domain.OmahaConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
OmahaInteractorIF オマハホールデムインタラクターインタフェース
type OmahaInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
TournamentInteractorIF
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.OmahaConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// GetConfig 現在の設定を取得
GetConfig() domain.OmahaConfig
// ActionLog 棋譜を出力する
ActionLog() string
}PigsTailInteractor ぶたのしっぽインタラクタークラス
type PigsTailInteractor struct {
// contains filtered or unexported fields
}### func NewPigsTailInteractor
func NewPigsTailInteractor(pt interfaces.PigsTailGame, ptp presenter.PigsTailPresenter) *PigsTailInteractorNewPigsTailInteractor コンストラクタ
### func RestorePigsTailInteractor
func RestorePigsTailInteractor(data []byte, ptp presenter.PigsTailPresenter) (*PigsTailInteractor, error)RestorePigsTailInteractor deserialises JSON into a PigsTailInteractor.
### func (*PigsTailInteractor) Action
func (pi *PigsTailInteractor) Action(actionIdx int) stringAction 人間プレイヤーのアクション (山札から1枚引く)
### func (*PigsTailInteractor) ActionLog
func (pi *PigsTailInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*PigsTailInteractor) GetConfig
func (pi *PigsTailInteractor) GetConfig() domain.PigsTailConfigGetConfig 現在の設定を返す
### func (*PigsTailInteractor) Reset
func (pi *PigsTailInteractor) Reset(config domain.PigsTailConfig) stringReset ゲーム初期化
PigsTailInteractorIF ぶたのしっぽインタラクターインタフェース
type PigsTailInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset(config domain.PigsTailConfig) string
// GetConfig 現在の設定を返す
GetConfig() domain.PigsTailConfig
// Action 人間プレイヤーのアクション (山札から1枚引く)
Action(actionIdx int) string
// ActionLog 棋譜を出力する
ActionLog() string
}PineappleInteractor パイナップルポーカーインタラクタークラス
type PineappleInteractor struct {
// contains filtered or unexported fields
}### func NewPineappleInteractor
func NewPineappleInteractor(p interfaces.PineappleGame, pp presenter.PineapplePresenter) *PineappleInteractorNewPineappleInteractor コンストラクタ
### func RestorePineappleInteractor
func RestorePineappleInteractor(data []byte, pp presenter.PineapplePresenter) (*PineappleInteractor, error)RestorePineappleInteractor deserialises JSON into a PineappleInteractor.
### func (*PineappleInteractor) Action
func (pi *PineappleInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*PineappleInteractor) ActionLog
func (pi *PineappleInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*PineappleInteractor) Discard
func (pi *PineappleInteractor) Discard(cardIdx int) stringDiscard ディスカード実行
### func (*PineappleInteractor) GetConfig
func (pi *PineappleInteractor) GetConfig() domain.PineappleConfigGetConfig 現在の設定を取得
### func (*PineappleInteractor) Reset
func (pi *PineappleInteractor) Reset() stringReset ゲーム初期化
### func (*PineappleInteractor) ResetWithConfig
func (pi *PineappleInteractor) ResetWithConfig(cfg domain.PineappleConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
PineappleInteractorIF パイナップルポーカーインタラクターインタフェース
type PineappleInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
TournamentInteractorIF
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.PineappleConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// Discard ディスカード実行
Discard(cardIdx int) string
// GetConfig 現在の設定を取得
GetConfig() domain.PineappleConfig
// ActionLog 棋譜を出力する
ActionLog() string
}PinochleInteractor ピノクルインタラクタークラス
type PinochleInteractor struct {
// contains filtered or unexported fields
}### func NewPinochleInteractor
func NewPinochleInteractor(p interfaces.PinochleGame, pp presenter.PinochlePresenter) *PinochleInteractorNewPinochleInteractor コンストラクタ
### func RestorePinochleInteractor
func RestorePinochleInteractor(data []byte, pp presenter.PinochlePresenter) (*PinochleInteractor, error)RestorePinochleInteractor deserialises JSON into a PinochleInteractor.
### func (*PinochleInteractor) ActionLog
func (pi *PinochleInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*PinochleInteractor) Bid
func (pi *PinochleInteractor) Bid(amount int) stringBid ビッドする
### func (*PinochleInteractor) CallTrump
func (pi *PinochleInteractor) CallTrump(suit int) stringCallTrump トランプスートを宣言する
### func (*PinochleInteractor) ConfirmMelds
func (pi *PinochleInteractor) ConfirmMelds() stringConfirmMelds メルドを確認してプレイフェーズに進む
### func (*PinochleInteractor) GetConfig
func (pi *PinochleInteractor) GetConfig() domain.PinochleConfigGetConfig 現在の設定を取得
### func (*PinochleInteractor) Hint
func (pi *PinochleInteractor) Hint() stringHint ヒント取得
### func (*PinochleInteractor) NextRound
func (pi *PinochleInteractor) NextRound() stringNextRound 次のラウンドへ進む
### func (*PinochleInteractor) NextTrick
func (pi *PinochleInteractor) NextTrick() stringNextTrick 次のトリックへ進む
### func (*PinochleInteractor) Pass
func (pi *PinochleInteractor) Pass() stringPass パスする
### func (*PinochleInteractor) Play
func (pi *PinochleInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*PinochleInteractor) Reset
func (pi *PinochleInteractor) Reset() stringReset ゲーム初期化
### func (*PinochleInteractor) ResetWithConfig
func (pi *PinochleInteractor) ResetWithConfig(cfg domain.PinochleConfig) stringResetWithConfig 設定を変更してゲーム初期化
PinochleInteractorIF ピノクルインタラクターインタフェース
type PinochleInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.PinochleConfig) string
// Bid ビッドする
Bid(amount int) string
// Pass パスする
Pass() string
// CallTrump トランプスートを宣言する
CallTrump(suit int) string
// ConfirmMelds メルドを確認
ConfirmMelds() string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound 次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.PinochleConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}PokerInteractor ポーカーインタラクタークラス
type PokerInteractor struct {
// contains filtered or unexported fields
}func NewPokerInteractor(p interfaces.PokerGame, pp presenter.PokerPresenter) *PokerInteractorNewPokerInteractor コンストラクタ
### func RestorePokerInteractor
func RestorePokerInteractor(data []byte, pp presenter.PokerPresenter) (*PokerInteractor, error)RestorePokerInteractor deserialises JSON into a PokerInteractor.
### func (*PokerInteractor) Action
func (pi *PokerInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*PokerInteractor) ActionLog
func (pi *PokerInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*PokerInteractor) Exchange
func (pi *PokerInteractor) Exchange(indices []int) stringExchange カード交換
### func (*PokerInteractor) GetConfig
func (pi *PokerInteractor) GetConfig() domain.PokerConfigGetConfig 現在の設定を取得
### func (*PokerInteractor) Odds
func (pi *PokerInteractor) Odds(indices []int) stringOdds ドローオッズ計算
### func (*PokerInteractor) Reset
func (pi *PokerInteractor) Reset() stringReset ゲーム初期化
### func (*PokerInteractor) ResetWithConfig
func (pi *PokerInteractor) ResetWithConfig(cfg domain.PokerConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
### func (*PokerInteractor) Stand
func (pi *PokerInteractor) Stand() stringStand カード交換なし
PokerInteractorIF ポーカーインタラクターインタフェース
type PokerInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.PokerConfig, profileData []byte) string
// GetConfig 現在の設定を取得
GetConfig() domain.PokerConfig
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// Exchange カード交換
Exchange(indices []int) string
// Stand カード交換なし
Stand() string
// Odds ドローオッズ計算
Odds(indices []int) string
// ActionLog 棋譜を出力する
ActionLog() string
}PyramidInteractor ピラミッドインタラクタークラス
type PyramidInteractor struct {
// contains filtered or unexported fields
}func NewPyramidInteractor(p interfaces.PyramidGame, pp presenter.PyramidPresenter) *PyramidInteractorNewPyramidInteractor コンストラクタ
### func RestorePyramidInteractor
func RestorePyramidInteractor(data []byte, pp presenter.PyramidPresenter) (*PyramidInteractor, error)RestorePyramidInteractor deserialises JSON into a PyramidInteractor.
### func (*PyramidInteractor) ActionLog
func (pi *PyramidInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*PyramidInteractor) Draw
func (pi *PyramidInteractor) Draw() stringDraw ストックからウェイストにカードを引く
### func (*PyramidInteractor) GiveUp
func (pi *PyramidInteractor) GiveUp() stringGiveUp ギブアップ
### func (*PyramidInteractor) Hint
func (pi *PyramidInteractor) Hint() stringHint ヒント取得
### func (*PyramidInteractor) RemoveKing
func (pi *PyramidInteractor) RemoveKing(row, col int) stringRemoveKing ピラミッド上のKを単独除去
### func (*PyramidInteractor) RemovePair
func (pi *PyramidInteractor) RemovePair(row1, col1, row2, col2 int) stringRemovePair ピラミッド上の2枚を合計13で除去
### func (*PyramidInteractor) RemoveWasteKing
func (pi *PyramidInteractor) RemoveWasteKing() stringRemoveWasteKing ウェイストのK除去
### func (*PyramidInteractor) RemoveWithWaste
func (pi *PyramidInteractor) RemoveWithWaste(row, col int) stringRemoveWithWaste ウェイストとピラミッドのペア除去
### func (*PyramidInteractor) Reset
func (pi *PyramidInteractor) Reset() stringReset ゲーム初期化
### func (*PyramidInteractor) Undo
func (pi *PyramidInteractor) Undo() stringUndo アンドゥ
### func (*PyramidInteractor) UndoN
func (pi *PyramidInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
PyramidInteractorIF ピラミッドインタラクターインタフェース
type PyramidInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Draw ストックからウェイストにカードを引く
Draw() string
// RemovePair ピラミッド上の2枚を合計13で除去
RemovePair(row1, col1, row2, col2 int) string
// RemoveKing ピラミッド上のKを単独除去
RemoveKing(row, col int) string
// RemoveWithWaste ウェイストとピラミッドのペア除去
RemoveWithWaste(row, col int) string
// RemoveWasteKing ウェイストのK除去
RemoveWasteKing() string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}## type SevenCardStudInteractor
SevenCardStudInteractor セブンカードスタッドインタラクタークラス
type SevenCardStudInteractor struct {
// contains filtered or unexported fields
}### func NewSevenCardStudInteractor
func NewSevenCardStudInteractor(s interfaces.SevenCardStudGame, sp presenter.SevenCardStudPresenter) *SevenCardStudInteractorNewSevenCardStudInteractor コンストラクタ
### func RestoreSevenCardStudInteractor
func RestoreSevenCardStudInteractor(data []byte, sp presenter.SevenCardStudPresenter) (*SevenCardStudInteractor, error)RestoreSevenCardStudInteractor deserialises JSON into a SevenCardStudInteractor.
### func (*SevenCardStudInteractor) Action
func (si *SevenCardStudInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*SevenCardStudInteractor) ActionLog
func (si *SevenCardStudInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*SevenCardStudInteractor) GetConfig
func (si *SevenCardStudInteractor) GetConfig() domain.SevenCardStudConfigGetConfig 現在の設定を取得
### func (*SevenCardStudInteractor) Reset
func (si *SevenCardStudInteractor) Reset() stringReset ゲーム初期化
### func (*SevenCardStudInteractor) ResetWithConfig
func (si *SevenCardStudInteractor) ResetWithConfig(cfg domain.SevenCardStudConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
## type SevenCardStudInteractorIF
SevenCardStudInteractorIF セブンカードスタッドインタラクターインタフェース
type SevenCardStudInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
TournamentInteractorIF
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.SevenCardStudConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// GetConfig 現在の設定を取得
GetConfig() domain.SevenCardStudConfig
// ActionLog 棋譜を出力する
ActionLog() string
}SevensInteractor 7並べインタラクタークラス
type SevensInteractor struct {
// contains filtered or unexported fields
}func NewSevensInteractor(s interfaces.SevensGame, sp presenter.SevensPresenter) *SevensInteractorNewSevensInteractor コンストラクタ
### func RestoreSevensInteractor
func RestoreSevensInteractor(data []byte, sp presenter.SevensPresenter) (*SevensInteractor, error)RestoreSevensInteractor deserialises JSON into a SevensInteractor.
### func (*SevensInteractor) ActionLog
func (si *SevensInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*SevensInteractor) Play
func (si *SevensInteractor) Play(idx int) stringPlay 人間プレイヤーがカードを出す (または パスする) idx: 出すカードのインデックス。-1 の場合はパス。
### func (*SevensInteractor) PlayJoker
func (si *SevensInteractor) PlayJoker(cardIdx, targetSuit, targetValue int) stringPlayJoker 人間プレイヤーがジョーカーを指定ポジションに出す
### func (*SevensInteractor) Reset
func (si *SevensInteractor) Reset() stringReset ゲーム初期化
### func (*SevensInteractor) ResetWithConfig
func (si *SevensInteractor) ResetWithConfig(cfg domain.SevensConfig) stringResetWithConfig 設定付きゲーム初期化
SevensInteractorIF 7並べインタラクターインタフェース
type SevensInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定付きゲーム初期化
ResetWithConfig(cfg domain.SevensConfig) string
// Play 人間プレイヤーがカードを出す (または パスする)
Play(idx int) string
// PlayJoker 人間プレイヤーがジョーカーを指定ポジションに出す
PlayJoker(cardIdx, targetSuit, targetValue int) string
// ActionLog 棋譜を出力する
ActionLog() string
}ShortDeckInteractor ショートデックホールデムインタラクタークラス
type ShortDeckInteractor struct {
// contains filtered or unexported fields
}### func NewShortDeckInteractor
func NewShortDeckInteractor(o interfaces.ShortDeckGame, op presenter.ShortDeckPresenter) *ShortDeckInteractorNewShortDeckInteractor コンストラクタ
### func RestoreShortDeckInteractor
func RestoreShortDeckInteractor(data []byte, op presenter.ShortDeckPresenter) (*ShortDeckInteractor, error)RestoreShortDeckInteractor deserialises JSON into a ShortDeckInteractor.
### func (*ShortDeckInteractor) Action
func (oi *ShortDeckInteractor) Action(action int, amount int, humanPlayMs int) stringAction プレイヤーアクション実行
### func (*ShortDeckInteractor) ActionLog
func (oi *ShortDeckInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*ShortDeckInteractor) GetConfig
func (oi *ShortDeckInteractor) GetConfig() domain.ShortDeckConfigGetConfig 現在の設定を取得
### func (*ShortDeckInteractor) Reset
func (oi *ShortDeckInteractor) Reset() stringReset ゲーム初期化
### func (*ShortDeckInteractor) ResetWithConfig
func (oi *ShortDeckInteractor) ResetWithConfig(cfg domain.ShortDeckConfig, profileData []byte) stringResetWithConfig 設定を変更してゲーム初期化
ShortDeckInteractorIF ショートデックホールデムインタラクターインタフェース
type ShortDeckInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
TournamentInteractorIF
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化 (profileData: JSONプロファイル、nilなら無視)
ResetWithConfig(cfg domain.ShortDeckConfig, profileData []byte) string
// Action プレイヤーアクション実行
Action(action int, amount int, humanPlayMs int) string
// GetConfig 現在の設定を取得
GetConfig() domain.ShortDeckConfig
// ActionLog 棋譜を出力する
ActionLog() string
}SpadesInteractor スペードインタラクタークラス
type SpadesInteractor struct {
// contains filtered or unexported fields
}func NewSpadesInteractor(s interfaces.SpadesGame, sp presenter.SpadesPresenter) *SpadesInteractorNewSpadesInteractor コンストラクタ
### func RestoreSpadesInteractor
func RestoreSpadesInteractor(data []byte, sp presenter.SpadesPresenter) (*SpadesInteractor, error)RestoreSpadesInteractor deserialises JSON into a SpadesInteractor.
### func (*SpadesInteractor) ActionLog
func (si *SpadesInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*SpadesInteractor) Bid
func (si *SpadesInteractor) Bid(bid int) stringBid ビッドを宣言
### func (*SpadesInteractor) GetConfig
func (si *SpadesInteractor) GetConfig() domain.SpadesConfigGetConfig 現在の設定を取得
### func (*SpadesInteractor) Hint
func (si *SpadesInteractor) Hint() stringHint ヒント取得
### func (*SpadesInteractor) NextRound
func (si *SpadesInteractor) NextRound() stringNextRound ラウンドをスコアリングして次のラウンドへ進む
### func (*SpadesInteractor) NextTrick
func (si *SpadesInteractor) NextTrick() stringNextTrick 次のトリックへ進む
### func (*SpadesInteractor) Play
func (si *SpadesInteractor) Play(cardIndex int) stringPlay カードをプレイ
### func (*SpadesInteractor) Reset
func (si *SpadesInteractor) Reset() stringReset ゲーム初期化
### func (*SpadesInteractor) ResetWithConfig
func (si *SpadesInteractor) ResetWithConfig(cfg domain.SpadesConfig) stringResetWithConfig 設定を変更してゲーム初期化
SpadesInteractorIF スペードインタラクターインタフェース
type SpadesInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.SpadesConfig) string
// Bid ビッドを宣言
Bid(bid int) string
// Play カードをプレイ
Play(cardIndex int) string
// NextTrick 次のトリックへ進む
NextTrick() string
// NextRound ラウンドをスコアリングして次のラウンドへ進む
NextRound() string
// GetConfig 現在の設定を取得
GetConfig() domain.SpadesConfig
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
}SpeedInteractor スピードインタラクタークラス
type SpeedInteractor struct {
// contains filtered or unexported fields
}func NewSpeedInteractor(s interfaces.SpeedGame, sp presenter.SpeedPresenter) *SpeedInteractorNewSpeedInteractor コンストラクタ
### func RestoreSpeedInteractor
func RestoreSpeedInteractor(data []byte, sp presenter.SpeedPresenter) (*SpeedInteractor, error)RestoreSpeedInteractor deserialises JSON into a SpeedInteractor.
### func (*SpeedInteractor) ActionLog
func (si *SpeedInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*SpeedInteractor) Flip
func (si *SpeedInteractor) Flip() stringFlip 膠着時に台札をめくる
### func (*SpeedInteractor) GetConfig
func (si *SpeedInteractor) GetConfig() domain.SpeedConfigGetConfig 現在の設定を取得
### func (*SpeedInteractor) Hint
func (si *SpeedInteractor) Hint() stringHint ヒントを取得する
### func (*SpeedInteractor) Play
func (si *SpeedInteractor) Play(cardIndex, pileIndex int) stringPlay 人間プレイヤーがカードを出す、その後CPUが自動応答する
### func (*SpeedInteractor) Reset
func (si *SpeedInteractor) Reset() stringReset ゲーム初期化
### func (*SpeedInteractor) ResetWithConfig
func (si *SpeedInteractor) ResetWithConfig(cfg domain.SpeedConfig) stringResetWithConfig 設定を変更してゲーム初期化
SpeedInteractorIF スピードインタラクターインタフェース
type SpeedInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定を変更してゲーム初期化
ResetWithConfig(cfg domain.SpeedConfig) string
// Play 人間プレイヤーがカードを出す
Play(cardIndex, pileIndex int) string
// Flip 膠着時に台札をめくる
Flip() string
// Hint ヒントを取得する
Hint() string
// GetConfig 現在の設定を取得
GetConfig() domain.SpeedConfig
// ActionLog 棋譜を出力する
ActionLog() string
}SpiderInteractor スパイダーソリティアインタラクタークラス
type SpiderInteractor struct {
// contains filtered or unexported fields
}func NewSpiderInteractor(s interfaces.SpiderGame, sp presenter.SpiderPresenter) *SpiderInteractorNewSpiderInteractor コンストラクタ
### func RestoreSpiderInteractor
func RestoreSpiderInteractor(data []byte, sp presenter.SpiderPresenter) (*SpiderInteractor, error)RestoreSpiderInteractor deserialises JSON into a SpiderInteractor.
### func (*SpiderInteractor) ActionLog
func (si *SpiderInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*SpiderInteractor) AutoComplete
func (si *SpiderInteractor) AutoComplete() stringAutoComplete オートコンプリート
### func (*SpiderInteractor) Deal
func (si *SpiderInteractor) Deal() stringDeal ストックからタブローに配る
### func (*SpiderInteractor) GiveUp
func (si *SpiderInteractor) GiveUp() stringGiveUp ギブアップ
### func (*SpiderInteractor) Hint
func (si *SpiderInteractor) Hint() stringHint ヒント取得
### func (*SpiderInteractor) MoveTableauToTableau
func (si *SpiderInteractor) MoveTableauToTableau(fromCol, cardIndex, toCol int) stringMoveTableauToTableau タブロー間でカードを移動
### func (*SpiderInteractor) Reset
func (si *SpiderInteractor) Reset() stringReset ゲーム初期化
### func (*SpiderInteractor) ResetWithConfig
func (si *SpiderInteractor) ResetWithConfig(cfg domain.SpiderConfig) stringResetWithConfig 設定付きリセット
### func (*SpiderInteractor) Undo
func (si *SpiderInteractor) Undo() stringUndo アンドゥ
### func (*SpiderInteractor) UndoN
func (si *SpiderInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
SpiderInteractorIF スパイダーソリティアインタラクターインタフェース
type SpiderInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// ResetWithConfig 設定付きリセット
ResetWithConfig(cfg domain.SpiderConfig) string
// Deal ストックからタブローに配る
Deal() string
// MoveTableauToTableau タブロー間でカードを移動
MoveTableauToTableau(fromCol, cardIndex, toCol int) string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// AutoComplete オートコンプリート
AutoComplete() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}ThreeCardInteractor スリーカードポーカーインタラクタークラス
type ThreeCardInteractor struct {
// contains filtered or unexported fields
}### func NewThreeCardInteractor
func NewThreeCardInteractor(tc interfaces.ThreeCardGame, tp presenter.ThreeCardPresenter) *ThreeCardInteractorNewThreeCardInteractor コンストラクタ
### func RestoreThreeCardInteractor
func RestoreThreeCardInteractor(data []byte, tp presenter.ThreeCardPresenter) (*ThreeCardInteractor, error)RestoreThreeCardInteractor deserialises JSON into a ThreeCardInteractor.
### func (*ThreeCardInteractor) ActionLog
func (ti *ThreeCardInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*ThreeCardInteractor) Bet
func (ti *ThreeCardInteractor) Bet(ante, pairPlus int) stringBet アンテベット
### func (*ThreeCardInteractor) Fold
func (ti *ThreeCardInteractor) Fold() stringFold フォールド
### func (*ThreeCardInteractor) Play
func (ti *ThreeCardInteractor) Play() stringPlay プレイ
### func (*ThreeCardInteractor) Reset
func (ti *ThreeCardInteractor) Reset() stringReset ゲーム初期化
ThreeCardInteractorIF スリーカードポーカーインタラクターインタフェース
type ThreeCardInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Bet アンテベット
Bet(ante, pairPlus int) string
// Play プレイ
Play() string
// Fold フォールド
Fold() string
// ActionLog 棋��を出力する
ActionLog() string
}## type TournamentInteractorIF
TournamentInteractorIF トーナメントアクション共通インタラクターインタフェース リバイ・アドオン・マック・ハンド公開の委譲メソッドを定義する。
type TournamentInteractorIF interface {
// Rebuy リバイ実行
Rebuy() string
// SkipRebuy リバイ辞退
SkipRebuy() string
// Addon アドオン実行
Addon() string
// SkipAddon アドオン辞退
SkipAddon() string
// Muck マック (ハンドを伏せる)
Muck() string
// ShowHand ハンドを公開する
ShowHand() string
}TriPeaksInteractor トリピークスインタラクタークラス
type TriPeaksInteractor struct {
// contains filtered or unexported fields
}### func NewTriPeaksInteractor
func NewTriPeaksInteractor(t interfaces.TriPeaksGame, tp presenter.TriPeaksPresenter) *TriPeaksInteractorNewTriPeaksInteractor コンストラクタ
### func RestoreTriPeaksInteractor
func RestoreTriPeaksInteractor(data []byte, tp presenter.TriPeaksPresenter) (*TriPeaksInteractor, error)RestoreTriPeaksInteractor deserialises JSON into a TriPeaksInteractor.
### func (*TriPeaksInteractor) ActionLog
func (ti *TriPeaksInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*TriPeaksInteractor) Draw
func (ti *TriPeaksInteractor) Draw() stringDraw ストックからウェイストにカードを引く
### func (*TriPeaksInteractor) GiveUp
func (ti *TriPeaksInteractor) GiveUp() stringGiveUp ギブアップ
### func (*TriPeaksInteractor) Hint
func (ti *TriPeaksInteractor) Hint() stringHint ヒント取得
### func (*TriPeaksInteractor) Remove
func (ti *TriPeaksInteractor) Remove(row, col int) stringRemove タブローのカードを除去
### func (*TriPeaksInteractor) Reset
func (ti *TriPeaksInteractor) Reset() stringReset ゲーム初期化
### func (*TriPeaksInteractor) Undo
func (ti *TriPeaksInteractor) Undo() stringUndo アンドゥ
### func (*TriPeaksInteractor) UndoN
func (ti *TriPeaksInteractor) UndoN(n int) stringUndoN n回連続アンドゥ
TriPeaksInteractorIF トリピークスインタラクターインタフェース
type TriPeaksInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Draw ストックからウェイストにカードを引く
Draw() string
// Remove タブローのカードを除去
Remove(row, col int) string
// GiveUp ギブアップ
GiveUp() string
// Hint ヒント取得
Hint() string
// ActionLog 棋譜を出力する
ActionLog() string
// Undo アンドゥ
Undo() string
// UndoN n回連続アンドゥ
UndoN(n int) string
}VideoPokerInteractor ビデオポーカーインタラクタークラス
type VideoPokerInteractor struct {
// contains filtered or unexported fields
}### func NewVideoPokerInteractor
func NewVideoPokerInteractor(vp interfaces.VideoPokerGame, vpp presenter.VideoPokerPresenter) *VideoPokerInteractorNewVideoPokerInteractor コンストラクタ
### func RestoreVideoPokerInteractor
func RestoreVideoPokerInteractor(data []byte, vpp presenter.VideoPokerPresenter) (*VideoPokerInteractor, error)RestoreVideoPokerInteractor deserialises JSON into a VideoPokerInteractor.
### func (*VideoPokerInteractor) ActionLog
func (vi *VideoPokerInteractor) ActionLog() stringActionLog 棋譜を出力する
### func (*VideoPokerInteractor) Bet
func (vi *VideoPokerInteractor) Bet(amount int) stringBet ベット
### func (*VideoPokerInteractor) Hold
func (vi *VideoPokerInteractor) Hold(indices []int) stringHold ホールド&ドロー
### func (*VideoPokerInteractor) Reset
func (vi *VideoPokerInteractor) Reset() stringReset ゲーム初期化
## type VideoPokerInteractorIF
VideoPokerInteractorIF ビデオポーカーインタラクターインタフェース
type VideoPokerInteractorIF interface {
// Snapshot serialises game state for KV persistence.
Snapshot() ([]byte, error)
// Reset ゲーム初期化
Reset() string
// Bet ベット
Bet(amount int) string
// Hold ホールド&ドロー
Hold(indices []int) string
// ActionLog 棋譜を出力する
ActionLog() string
}Generated by gomarkdoc