Documentation
¶
Index ¶
- Constants
- func Alive(g *game.Game, i int) bool
- func InBounds(g *game.Game, i int) bool
- func NewState(id int) *state
- func NotEqual(g *game.Game, i int, j int) bool
- type BaseRole
- func (s BaseRole) Alive() bool
- func (s BaseRole) Alliance() game.Alliance
- func (b *BaseRole) Die(g *game.Game, werewolves bool)
- func (s BaseRole) ID() int
- func (b *BaseRole) Name() string
- func (b *BaseRole) OnDailyVote(g *game.Game, e *events.DailyVoteEvent)
- func (b *BaseRole) OnGameStarted(g *game.Game, e *events.GameStartedEvent)
- func (b *BaseRole) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
- func (b *BaseRole) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
- func (b *BaseRole) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
- func (b *BaseRole) OnWerewolfVote(g *game.Game, e *events.WerewolfVoteEvent)
- func (s BaseRole) SetAlive(alive bool)
- func (s BaseRole) SetAlliance(alliance game.Alliance)
- func (s BaseRole) SetID(id int)
- type Cupid
- func (s Cupid) Alive() bool
- func (s Cupid) Alliance() game.Alliance
- func (s Cupid) ID() int
- func (c *Cupid) Name() string
- func (c *Cupid) OnGameStarted(g *game.Game, e *events.GameStartedEvent)
- func (c *Cupid) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
- func (s Cupid) SetAlive(alive bool)
- func (s Cupid) SetAlliance(alliance game.Alliance)
- func (s Cupid) SetID(id int)
- type Healer
- func (s Healer) Alive() bool
- func (s Healer) Alliance() game.Alliance
- func (s Healer) ID() int
- func (h *Healer) Name() string
- func (h *Healer) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
- func (h *Healer) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
- func (s Healer) SetAlive(alive bool)
- func (s Healer) SetAlliance(alliance game.Alliance)
- func (s Healer) SetID(id int)
- type Hunter
- func (s Hunter) Alive() bool
- func (s Hunter) Alliance() game.Alliance
- func (s Hunter) ID() int
- func (h *Hunter) Name() string
- func (h *Hunter) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
- func (s Hunter) SetAlive(alive bool)
- func (s Hunter) SetAlliance(alliance game.Alliance)
- func (s Hunter) SetID(id int)
- type RoleFactory
- type Seer
- func (s Seer) Alive() bool
- func (s Seer) Alliance() game.Alliance
- func (s Seer) ID() int
- func (s *Seer) Name() string
- func (s *Seer) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
- func (s Seer) SetAlive(alive bool)
- func (s Seer) SetAlliance(alliance game.Alliance)
- func (s Seer) SetID(id int)
- type Slut
- func (s Slut) Alive() bool
- func (s Slut) Alliance() game.Alliance
- func (s Slut) ID() int
- func (s *Slut) Name() string
- func (s *Slut) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
- func (s *Slut) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
- func (s Slut) SetAlive(alive bool)
- func (s Slut) SetAlliance(alliance game.Alliance)
- func (s Slut) SetID(id int)
- type VillageElder
- func (s VillageElder) Alive() bool
- func (s VillageElder) Alliance() game.Alliance
- func (s VillageElder) ID() int
- func (v *VillageElder) Name() string
- func (v *VillageElder) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
- func (s VillageElder) SetAlive(alive bool)
- func (s VillageElder) SetAlliance(alliance game.Alliance)
- func (s VillageElder) SetID(id int)
- type Villager
- type Werewolf
- func (s Werewolf) Alive() bool
- func (s Werewolf) Alliance() game.Alliance
- func (s Werewolf) ID() int
- func (w *Werewolf) Name() string
- func (w *Werewolf) OnWerewolfVote(g *game.Game, e *events.WerewolfVoteEvent)
- func (s Werewolf) SetAlive(alive bool)
- func (s Werewolf) SetAlliance(alliance game.Alliance)
- func (s Werewolf) SetID(id int)
- type Witch
- func (s Witch) Alive() bool
- func (s Witch) Alliance() game.Alliance
- func (s Witch) ID() int
- func (w *Witch) Name() string
- func (w *Witch) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
- func (s Witch) SetAlive(alive bool)
- func (s Witch) SetAlliance(alliance game.Alliance)
- func (s Witch) SetID(id int)
Constants ¶
View Source
const ( UNDEFINED = "Undefined" VILLAGER = "Villager" WEREWOLF = "Werewolf" HUNTER = "Hunter" HEALER = "Healer" VILLAGE_ELDER = "Village Elder" WITCH = "Witch" CUPID = "Cupid" SEER = "Seer" SLUT = "Slut" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRole ¶
type BaseRole struct {
// contains filtered or unexported fields
}
func (*BaseRole) OnDailyVote ¶
func (b *BaseRole) OnDailyVote(g *game.Game, e *events.DailyVoteEvent)
func (*BaseRole) OnGameStarted ¶
func (b *BaseRole) OnGameStarted(g *game.Game, e *events.GameStartedEvent)
func (*BaseRole) OnNightStarted ¶
func (b *BaseRole) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
func (*BaseRole) OnPlayerDead ¶
func (b *BaseRole) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
func (*BaseRole) OnPlayerRevealed ¶
func (b *BaseRole) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
func (*BaseRole) OnWerewolfVote ¶
func (b *BaseRole) OnWerewolfVote(g *game.Game, e *events.WerewolfVoteEvent)
func (BaseRole) SetAlliance ¶
type Cupid ¶
type Cupid struct { *BaseRole // contains filtered or unexported fields }
func (*Cupid) OnGameStarted ¶
func (c *Cupid) OnGameStarted(g *game.Game, e *events.GameStartedEvent)
func (*Cupid) OnPlayerRevealed ¶
func (c *Cupid) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
func (Cupid) SetAlliance ¶
type Healer ¶
type Healer struct { *BaseRole // contains filtered or unexported fields }
func (*Healer) OnNightStarted ¶
func (h *Healer) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
func (*Healer) OnPlayerDead ¶
func (h *Healer) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
func (Healer) SetAlliance ¶
type Hunter ¶
type Hunter struct {
*BaseRole
}
func (*Hunter) OnPlayerRevealed ¶
func (h *Hunter) OnPlayerRevealed(g *game.Game, e *events.PlayerRevealedEvent)
func (Hunter) SetAlliance ¶
type Seer ¶
type Seer struct {
*BaseRole
}
func (*Seer) OnNightStarted ¶
func (s *Seer) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
func (Seer) SetAlliance ¶
type Slut ¶
type Slut struct { *BaseRole // contains filtered or unexported fields }
func (*Slut) OnNightStarted ¶
func (s *Slut) OnNightStarted(g *game.Game, e *events.NightStartedEvent)
func (*Slut) OnPlayerDead ¶
func (s *Slut) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
func (Slut) SetAlliance ¶
type VillageElder ¶
type VillageElder struct { *BaseRole // contains filtered or unexported fields }
func (*VillageElder) Name ¶
func (v *VillageElder) Name() string
func (*VillageElder) OnPlayerDead ¶
func (v *VillageElder) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
func (VillageElder) SetAlliance ¶
type Werewolf ¶
type Werewolf struct {
*BaseRole
}
func (*Werewolf) OnWerewolfVote ¶
func (w *Werewolf) OnWerewolfVote(g *game.Game, e *events.WerewolfVoteEvent)
func (Werewolf) SetAlliance ¶
type Witch ¶
type Witch struct { *BaseRole // contains filtered or unexported fields }
func (*Witch) OnPlayerDead ¶
func (w *Witch) OnPlayerDead(g *game.Game, e *events.PlayerDeadEvent)
func (Witch) SetAlliance ¶
Click to show internal directories.
Click to hide internal directories.