Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PlayRoomLimiter smachine.SyncLink = smsync.NewConditionalBool(true, "unlimited rooms").SyncLink()
Functions ¶
func RunExample ¶
func RunExample(machineLogger smachine.SlotMachineLogger)
Types ¶
type GameChooseAdapter ¶
type GameChooseAdapter struct {
// contains filtered or unexported fields
}
func NewGameAdapter ¶
func NewGameAdapter(ctx context.Context, svc GameChooseService) *GameChooseAdapter
func (*GameChooseAdapter) PrepareAsync ¶
func (a *GameChooseAdapter) PrepareAsync(ctx smachine.ExecutionContext, fn func(svc GameChooseService) smachine.AsyncResultFunc) smachine.AsyncCallRequester
type GameChooseService ¶
type GameChooseService interface {
ChooseGame() GameFactoryFunc
}
func NewGameChooseService ¶
func NewGameChooseService() GameChooseService
type GameFactoryFunc ¶
type GameFactoryFunc func(GamePlayers) GameStateMachine
type GamePlayers ¶
type GameRandom ¶
type GameRandom struct { GameTemplate // contains filtered or unexported fields }
func (*GameRandom) GetGameResult ¶
func (g *GameRandom) GetGameResult() GameResult
func (*GameRandom) GetSubroutineInitState ¶
func (g *GameRandom) GetSubroutineInitState(ctx smachine.SubroutineStartContext) smachine.InitFunc
type GameResult ¶
type GameResult struct { }
type GameStateMachine ¶
type GameStateMachine interface { smachine.SubroutineStateMachine GetGameResult() GameResult }
func NewGameOfRandom ¶
func NewGameOfRandom(gameKey longbits.ByteString, players GamePlayers) GameStateMachine
type GameTemplate ¶
type GameTemplate struct { smachine.StateMachineDeclTemplate // contains filtered or unexported fields }
func (*GameTemplate) GetInitStateFor ¶
func (g *GameTemplate) GetInitStateFor(smachine.StateMachine) smachine.InitFunc
func (*GameTemplate) GetStateMachineDeclaration ¶
func (g *GameTemplate) GetStateMachineDeclaration() smachine.StateMachineDeclaration
type PlayerSM ¶
type PlayerSM struct { smachine.StateMachineDeclTemplate // contains filtered or unexported fields }
func (PlayerSM) GetInitStateFor ¶
func (PlayerSM) GetInitStateFor(sm smachine.StateMachine) smachine.InitFunc
GetInitStateFor is a method of SM declaration that provides an init step for the given SM This method is invoked after injections and can rely on fields of SM. Nil returned by GetInitStateFor will cause an error for a caller.
func (*PlayerSM) GetStateMachineDeclaration ¶
func (p *PlayerSM) GetStateMachineDeclaration() smachine.StateMachineDeclaration
GetStateMachineDeclaration returns a declaration (class) of a state machine. Declaration is responsible for various initialization and processing capabilities.
For simplicity - SM declaration could be the same object as SM. When implementing SM declaration please embed smachine.StateMachineDeclTemplate to avoid manual implementation of required methods.
func (PlayerSM) InjectDependencies ¶
func (PlayerSM) InjectDependencies(sm smachine.StateMachine, link smachine.SlotLink, dj injector.DependencyInjector)
type SharedPairData ¶
type SharedPairData struct {
// contains filtered or unexported fields
}
type SharedPairDataLink ¶
type SharedPairDataLink struct {
// contains filtered or unexported fields
}
func (SharedPairDataLink) PrepareAccess ¶
func (v SharedPairDataLink) PrepareAccess(fn func(*SharedPairData) (wakeup bool)) smachine.SharedDataAccessor
Source Files
¶
Click to show internal directories.
Click to hide internal directories.