adv

package
v0.0.0-...-95be186 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adv

type Adv interface {
	Initialise(clientID shared.ClientID)
	ProposeRule(availableRules map[string]rules.RuleMatrix) (rules.RuleMatrix, bool)
	GetRuleViolationSeverity() (map[string]shared.IIGOSanctionsScore, bool)
	GetPardonedIslands(currentSanctions map[int][]shared.Sanction) (map[int][]bool, bool)
	CallPresidentElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)
	DecideNextPresident(winner shared.ClientID) (shared.ClientID, bool)
	CallJudgeElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)
	DecideNextJudge(winner shared.ClientID) (shared.ClientID, bool)
	CallSpeakerElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)
	DecideNextSpeaker(winner shared.ClientID) (shared.ClientID, bool)
	InspectHistory(iigoHistory []shared.Accountability, turnsAgo int) (map[shared.ClientID]shared.EvaluationReturn, bool, bool)
	SetTaxationAmount(islandsResources map[shared.ClientID]shared.ResourcesReport) (shared.PresidentReturnContent, bool)
}

type Malice

type Malice struct {
	Id shared.ClientID
	// contains filtered or unexported fields
}

func (*Malice) CallJudgeElection

func (m *Malice) CallJudgeElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Malice) CallPresidentElection

func (m *Malice) CallPresidentElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Malice) CallSpeakerElection

func (m *Malice) CallSpeakerElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Malice) DecideNextJudge

func (m *Malice) DecideNextJudge(winner shared.ClientID) (shared.ClientID, bool)

func (*Malice) DecideNextPresident

func (m *Malice) DecideNextPresident(winner shared.ClientID) (shared.ClientID, bool)

func (*Malice) DecideNextSpeaker

func (m *Malice) DecideNextSpeaker(winner shared.ClientID) (shared.ClientID, bool)

func (*Malice) GetPardonedIslands

func (m *Malice) GetPardonedIslands(currentSanctions map[int][]shared.Sanction) (map[int][]bool, bool)

func (*Malice) GetRuleViolationSeverity

func (m *Malice) GetRuleViolationSeverity() (map[string]shared.IIGOSanctionsScore, bool)

func (*Malice) Initialise

func (m *Malice) Initialise(id shared.ClientID)

func (*Malice) InspectHistory

func (m *Malice) InspectHistory(iigoHistory []shared.Accountability, turnsAgo int) (map[shared.ClientID]shared.EvaluationReturn, bool, bool)

func (*Malice) ProposeRule

func (m *Malice) ProposeRule(availableRules map[string]rules.RuleMatrix) (rules.RuleMatrix, bool)

func (*Malice) SetTaxationAmount

func (m *Malice) SetTaxationAmount(islandsResources map[shared.ClientID]shared.ResourcesReport) (shared.PresidentReturnContent, bool)

type Spec

type Spec int
const (
	NoAdv Spec = iota
	MaliceAdv
	TargetAdv
)

type Target

type Target struct {
	TargetID shared.ClientID
	// contains filtered or unexported fields
}

func (*Target) CallJudgeElection

func (m *Target) CallJudgeElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Target) CallPresidentElection

func (m *Target) CallPresidentElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Target) CallSpeakerElection

func (m *Target) CallSpeakerElection(monitoring shared.MonitorResult, turnsInPower int, allIslands []shared.ClientID) (shared.ElectionSettings, bool)

func (*Target) DecideNextJudge

func (m *Target) DecideNextJudge(winner shared.ClientID) (shared.ClientID, bool)

func (*Target) DecideNextPresident

func (m *Target) DecideNextPresident(winner shared.ClientID) (shared.ClientID, bool)

func (*Target) DecideNextSpeaker

func (m *Target) DecideNextSpeaker(winner shared.ClientID) (shared.ClientID, bool)

func (*Target) GetPardonedIslands

func (m *Target) GetPardonedIslands(currentSanctions map[int][]shared.Sanction) (map[int][]bool, bool)

func (*Target) GetRuleViolationSeverity

func (m *Target) GetRuleViolationSeverity() (map[string]shared.IIGOSanctionsScore, bool)

func (*Target) Initialise

func (m *Target) Initialise(id shared.ClientID)

func (*Target) InspectHistory

func (m *Target) InspectHistory(iigoHistory []shared.Accountability, turnsAgo int) (map[shared.ClientID]shared.EvaluationReturn, bool, bool)

func (*Target) ProposeRule

func (m *Target) ProposeRule(availableRules map[string]rules.RuleMatrix) (rules.RuleMatrix, bool)

func (*Target) SetTaxationAmount

func (m *Target) SetTaxationAmount(islandsResources map[shared.ClientID]shared.ResourcesReport) (shared.PresidentReturnContent, bool)

Jump to

Keyboard shortcuts

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