Documentation ¶
Index ¶
- type BuiltMode
- type BuiltPlugin
- type Context
- func (c Context) AddTrigger(trigger lsha.Trigger, player lsha.Player, eventNames ...string) (id uint64)
- func (c Context) BindData(data any)
- func (c Context) Data() any
- func (c *Context) Event() lsha.Event
- func (c *Context) Invoke(event lsha.Event)
- func (c Context) NextPlayer(player lsha.Player) lsha.Player
- func (c Context) PlayerIter(start lsha.Player) iter.Seq[lsha.Player]
- func (c Context) RemoveTrigger(id uint64)
- func (c Context) RoomConfig() any
- func (c Context) RuntimeConfig() lsha.ConfigBuilder
- func (c Context) Turn() lsha.Turn
- func (c *Context) WithEvent(event lsha.Event) lsha.Context
- type ModeInitUserBuilder
- type Phase
- type PhaseBuilder
- type Player
- type Trigger
- type Turn
- type TurnBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltMode ¶
type BuiltMode interface { lsha.ModeRegistration GetName() string GetDescription() string GetPlayerCountLimit() (min, max int) ValidateUser(user lsha.User) (reason string) CreateConfigBuilder() (configData any, creator func(readonly bool) []*form.Item) Run(configData any, users []lsha.User) }
func BuildMode ¶
func BuildMode(r func(lsha.ModeBuilder)) BuiltMode
type BuiltPlugin ¶
type BuiltPlugin interface { GetName() string GetDescription() string GetVersion() int GetDependents() map[string]int Load(registration lsha.ModeRepository) }
func BuildPlugin ¶
func BuildPlugin(r lsha.PluginRegister) BuiltPlugin
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (Context) AddTrigger ¶
func (Context) RemoveTrigger ¶
func (c Context) RemoveTrigger(id uint64)
func (Context) RoomConfig ¶
func (c Context) RoomConfig() any
func (Context) RuntimeConfig ¶
func (c Context) RuntimeConfig() lsha.ConfigBuilder
type ModeInitUserBuilder ¶
type ModeInitUserBuilder struct {
// contains filtered or unexported fields
}
func (*ModeInitUserBuilder) BindData ¶
func (m *ModeInitUserBuilder) BindData(data any) lsha.ModeInitUserBuilder
func (*ModeInitUserBuilder) Order ¶
func (m *ModeInitUserBuilder) Order() int
func (*ModeInitUserBuilder) RewriteOrder ¶
func (m *ModeInitUserBuilder) RewriteOrder(order int) lsha.ModeInitUserBuilder
func (*ModeInitUserBuilder) User ¶
func (m *ModeInitUserBuilder) User() lsha.User
type PhaseBuilder ¶
type PhaseBuilder struct {
// contains filtered or unexported fields
}
func (*PhaseBuilder) Name ¶
func (p *PhaseBuilder) Name(name string) lsha.PhaseBuilder
type TurnBuilder ¶
type TurnBuilder struct {
// contains filtered or unexported fields
}
func (*TurnBuilder) OnNextPhase ¶
func (t *TurnBuilder) OnNextPhase(phaseStarter lsha.PhaseStarter) lsha.TurnBuilder
func (*TurnBuilder) Player ¶
func (t *TurnBuilder) Player(p lsha.Player) lsha.TurnBuilder
func (*TurnBuilder) Round ¶
func (t *TurnBuilder) Round(n int) lsha.TurnBuilder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.