godipInfluence

package module
Version: 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: 2 Imported by: 0

README

godipInfluence

A package that allows the calculation of influenced provinces of a zond/godip game. I decided to not introduce this into the core as it is only a matter of how a user would like to see it implemented not of the adjudication. Feel free to discuss in the issues.

Installation

go get github.com/wulfheart/godip-influence

Usage

import (
	"github.com/wulfheart/godip-influence/defaultInfluences"
	"github.com/wulfheart/godip-influence/influenceCalculators"
	"github.com/zond/godip/variants"
)

// Variant/game starting
variantName := "Classical"
variant := variants.Variants[variantName]
state, _ := variant.Start()

// Getting the influence
// There may be custom functions of type InfluenceCalculator func (old Influence, new *state.State) Influence
var influence = influenceCalculators.WebdiplomacyClassic(defaultInfluences.ConvertToInfluence(defaultInfluences.Classical), state)
// e.g. influence["par"] -> godip.France

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Licensed under the EUPL-1.2-or-later

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Influence

type Influence map[godip.Province]godip.Nation

type InfluenceCalculator

type InfluenceCalculator func(old Influence, new *state.State) Influence

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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