Documentation ¶
Index ¶
- Constants
- type Action
- type Attribute
- type Role
- func (r *Role) HasNightKill() bool
- func (r *Role) HasRandomN0Clear() bool
- func (r *Role) IsAuxEvil() bool
- func (r *Role) IsMaxEvil() bool
- func (r *Role) IsSeer() bool
- func (r *Role) Kill() bool
- func (r *Role) KnowsMaxes() bool
- func (r *Role) SetTinker()
- func (r *Role) ViewForAuxEvil() bool
- func (r *Role) ViewForMaxEvil() bool
- func (r *Role) ViewForSeer() bool
- func (r *Role) ViewsForAux() bool
- func (r *Role) ViewsForMax() bool
- func (r *Role) ViewsForSeer() bool
Constants ¶
View Source
const ( Good = iota Evil = iota Neutral = iota // won't be used during the Hackathon )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct { Name string `json:"name"` Description string `json:"description"` Team int `json:"team"` Parity int `json:"-"` VoteMultiplier int `json:"-"` Health int `json:"-"` Alive bool `json:"alive"` Actions Action `json:"night_action"` Attributes Attribute `json:"-"` }
func (*Role) HasNightKill ¶
func (*Role) HasRandomN0Clear ¶
func (*Role) Kill ¶
Kill attempts to kill the player. If they had more than 1 health (ie were "tough") then they will remain alive.
func (*Role) KnowsMaxes ¶
func (*Role) SetTinker ¶
func (r *Role) SetTinker()
SetTinker makes a role a tinker: all views will be the inverse of the truth
func (*Role) ViewForAuxEvil ¶
ViewForAuxEvil allows seers to view if a role is aux evil. It differs from IsAuxEvil because the Tinker can invert the result.
func (*Role) ViewForMaxEvil ¶
ViewForMaxEvil allows seers to view if a role is max evil. It differs from IsMaxEvil because the Tinker can invert the result.
func (*Role) ViewForSeer ¶
ViewForSeer allows sorcerers to view if a role is a seer. It differs from IsSeer because the Tinker can invert the result.
func (*Role) ViewsForAux ¶
func (*Role) ViewsForMax ¶
func (*Role) ViewsForSeer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.