Documentation ¶
Overview ¶
Package gengovernment allows to generate various types of leadership or forms of government.
Index ¶
- Constants
- Variables
- type GenderRestriction
- type Leadership
- type LeadershipForm
- func (l LeadershipForm) CoupProgression() []LeadershipForm
- func (l LeadershipForm) Generate(preferredTags ...TitleTag) *Leadership
- func (l LeadershipForm) GetGenderRestriction() GenderRestriction
- func (l LeadershipForm) GetSuccessionType() SuccessionType
- func (l LeadershipForm) NaturalProgression() []LeadershipForm
- func (l LeadershipForm) RangeInfluence() (min, max LeadershipInfluence)
- func (l LeadershipForm) String() string
- func (l LeadershipForm) Title(preferredTags ...TitleTag) [2]string
- type LeadershipInfluence
- type SuccessionType
- type Title
- type TitleSet
- type TitleTag
Constants ¶
const ( GenderMale = iota GenderFemale )
Genders TODO: Expand
Variables ¶
var GovTree = map[LeadershipForm][]LeadershipForm{ LeadershipFormChiefdom: { LeadershipFormCouncil, LeadershipFormMonarchy, LeadershipFormDictatorship, }, LeadershipFormCouncil: { LeadershipFormRepublic, }, LeadershipFormMonarchy: { LeadershipFormRepublic, LeadershipFormDictatorship, }, LeadershipFormRepublic: { LeadershipFormDemocracy, }, }
GovTree represents the possible, natural paths when developing / evolving a government.
var GovTreeCoup = map[LeadershipForm][]LeadershipForm{ LeadershipFormChiefdom: { LeadershipFormDictatorship, }, LeadershipFormCouncil: { LeadershipFormDictatorship, LeadershipFormMonarchy, }, LeadershipFormMonarchy: { LeadershipFormDictatorship, LeadershipFormRepublic, }, LeadershipFormRepublic: { LeadershipFormDictatorship, LeadershipFormMonarchy, }, LeadershipFormDemocracy: { LeadershipFormDictatorship, LeadershipFormMonarchy, }, LeadershipFormDictatorship: { LeadershipFormRepublic, LeadershipFormCouncil, LeadershipFormMonarchy, }, }
GovTreeCoup represents the possible paths when a coup or revolution occurs.
Functions ¶
This section is empty.
Types ¶
type GenderRestriction ¶
type GenderRestriction int
const ( GenderRestrictionNone GenderRestriction = iota GenderRestrictionMale GenderRestrictionFemale // GenderRestrictionMalePreferred // GenderRestrictionFemalePreferred GenderRestrictionMax )
type Leadership ¶
type Leadership struct { Form LeadershipForm // The form of leadership. Title [2]string // Primary leader title (male and female variants) Succession SuccessionType // The type of succession. GenderRestriction GenderRestriction // Restrictions on gender for leadership (if any). }
func (*Leadership) ChangeForm ¶
func (l *Leadership) ChangeForm(form LeadershipForm, preferredTags ...TitleTag)
ChangeForm changes the form of leadership.
func (*Leadership) GetTitle ¶
func (l *Leadership) GetTitle(gender int) string
GetTitle returns the title of the leader given the gender.
type LeadershipForm ¶
type LeadershipForm int
const ( LeadershipFormChiefdom LeadershipForm = iota LeadershipFormCouncil LeadershipFormMonarchy LeadershipFormRepublic LeadershipFormDemocracy LeadershipFormDictatorship LeadershipFormMax )
The different forms of leadership.
func (LeadershipForm) CoupProgression ¶
func (l LeadershipForm) CoupProgression() []LeadershipForm
CoupProgression returns the possible forms of government that can evolve from the current form after a coup or revolution.
func (LeadershipForm) Generate ¶
func (l LeadershipForm) Generate(preferredTags ...TitleTag) *Leadership
func (LeadershipForm) GetGenderRestriction ¶
func (l LeadershipForm) GetGenderRestriction() GenderRestriction
func (LeadershipForm) GetSuccessionType ¶
func (l LeadershipForm) GetSuccessionType() SuccessionType
func (LeadershipForm) NaturalProgression ¶
func (l LeadershipForm) NaturalProgression() []LeadershipForm
NaturalProgression returns the possible forms of government that can evolve from the current form.
func (LeadershipForm) RangeInfluence ¶
func (l LeadershipForm) RangeInfluence() (min, max LeadershipInfluence)
RangeInfluence returns the minimum and maximum influence a type of leadership can have.
func (LeadershipForm) String ¶
func (l LeadershipForm) String() string
String returns the string representation of the leadership form.
func (LeadershipForm) Title ¶
func (l LeadershipForm) Title(preferredTags ...TitleTag) [2]string
Title returns the title of the leader. TODO: Role as a parameter, so we can get the title of a council member, etc. TODO: Also separate by language, so we can always get the titles for all roles with a consistent theme and feel.
type LeadershipInfluence ¶
type LeadershipInfluence int
LeadershipInfluence represents the minimum and maximum influence a type of leadership can have.
const ( LeadershipInfluenceUnset LeadershipInfluence = iota // The influence level is not set. LeadershipInfluenceTribe // Leadership is limited to a single tribe or clan. LeadershipInfluenceSettlement // Leadership extends to a single settlement or village. LeadershipInfluenceCityState // Leadership extends to a city-state or small kingdom. LeadershipInfluenceEmpire // Leadership extends to a large empire or nation. )
The different levels of influence a leader can have.
type SuccessionType ¶
type SuccessionType int
const ( SuccessionTypeInherited SuccessionType = iota SuccessionTypeElected SuccessionTypeAppointed SuccessionTypeMerit SuccessionTypeChosen SuccessionTypeMax )
type Title ¶
Title represents a potential title for a ruler or council member and includes the male and female variants, as well as tags for the context.