Documentation
¶
Index ¶
- type CardDef
- type CommonConfig
- type Context
- type EffectDef
- type Loader
- func (l *Loader) AddCard(card *sgs.Card)
- func (l *Loader) AddCardType(cardType *sgs.CardType) *sgs.CardType
- func (l *Loader) AddHero(hero *sgs.Hero)
- func (l *Loader) FilterCards(modeType sgs.ModeType) []*sgs.Card
- func (l *Loader) FilterHeroes(modeType sgs.ModeType) []*sgs.Hero
- func (l *Loader) FinishLoading()
- func (l *Loader) GetCards(cardTypeName string) []*sgs.Card
- func (l *Loader) GetHero(name sgs.HeroName) []*sgs.Hero
- func (l *Loader) GetHeroWithSuffix(name sgs.HeroName, suffix string) *sgs.Hero
- func (l *Loader) StartSolo(c *SoloConfig, users []*User) *Result
- type ModeRegistration
- type Ordered
- type Result
- type SoloConfig
- type SoloHandler
- type SoloHeroPickRule
- type SoloMockConfig
- type SoloPickHeroesOption
- type SoloPlayer
- type SoloResult
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonConfig ¶
type CommonConfig struct {
ShuffleUsers bool
}
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) SelectHeroes ¶
func (c *Context) SelectHeroes(req *sgs.SelectHeroesReq) *sgs.SelectHeroesResp
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) FinishLoading ¶
func (l *Loader) FinishLoading()
func (*Loader) GetHeroWithSuffix ¶
type ModeRegistration ¶
type SoloConfig ¶
type SoloConfig struct { *CommonConfig Mock *SoloMockConfig }
func NewSoloConfig ¶
func NewSoloConfig() *SoloConfig
type SoloHandler ¶
type SoloHandler struct {
// contains filtered or unexported fields
}
func NewSoloHandler ¶
func NewSoloHandler(l *Loader, c *SoloConfig, users []*User) *SoloHandler
func (*SoloHandler) Start ¶
func (h *SoloHandler) Start()
type SoloHeroPickRule ¶
type SoloHeroPickRule interface { Prepare(players []*SoloPlayer, allHeroes []*sgs.Hero) (remainedHeroes []*sgs.Hero) NextPick() *SoloPickHeroesOption UseCount(player *SoloPlayer) int }
type SoloMockConfig ¶
type SoloMockConfig struct {
MockHeroNames [][]string
}
type SoloPickHeroesOption ¶
type SoloPickHeroesOption struct { Candidates []*sgs.HeroToSelect TargetN int // if zero, no need to select Player *SoloPlayer // if nil, no need to select Callback func(heroes []*sgs.Hero) (willContinue bool) }
type SoloPlayer ¶
type SoloResult ¶
type SoloResult struct { }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.