influenceCalculators

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: EUPL-1.2 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebdiplomacyClassic godipinfluence.InfluenceCalculator = func(old godipinfluence.Influence, adjudicated *state.State) godipinfluence.Influence {

	for province, unit := range adjudicated.Units() {
		if ok := slice.Contains(adjudicated.Graph().AllSCs(), province); ok {
			continue
		}
		if !helpers.CanHostArmy(adjudicated.Graph(), province) {
			continue
		}
		old[province] = unit.Nation
	}

	for _, province := range adjudicated.Graph().Provinces() {

		nation, _, ok := adjudicated.SupplyCenter(province)
		if ok {

			old[province] = nation
		}
	}
	return old
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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