gengovernment

package
v0.0.0-...-ab92d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package gengovernment allows to generate various types of leadership or forms of government.

Index

Constants

View Source
const (
	GenderMale = iota
	GenderFemale
)

Genders TODO: Expand

Variables

GovTree represents the possible, natural paths when developing / evolving a government.

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

type Title struct {
	Variants [2]string
	Tags     []TitleTag
}

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.

type TitleSet

type TitleSet struct {
	Superior []Title // Titles for a superior or ruler like an emperor or dictator.
	Head     []Title // Titles a ruler like a king or queen, or a president.
}

type TitleTag

type TitleTag int

TitleTag represents a tag that can be associated with a title to provide additional context or meaning.

const (
	TitleTagOther TitleTag = iota
	TitleTagMilitary
	TitleTagService
	TitleTagWisdom
	TitleTagMythical
	TitleTagSensuality
	TitleTagPower
	TitleTagDivine
	TitleTagGrandeur
	TitleTagMagic
	TitleTagCruelty
	TitleTagMax
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL