hundred

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	England  godip.Nation = "England"
	Burgundy godip.Nation = "Burgundy"
	France   godip.Nation = "France"
)
View Source
const (
	YearSeason godip.Season = "Year"
)

Variables

View Source
var HundredVariant = common.Variant{
	Name:   "Hundred",
	Graph:  func() godip.Graph { return HundredGraph() },
	Start:  HundredStart,
	Blank:  HundredBlank,
	Phase:  Phase,
	Parser: BuildAnywhereParser,
	ExtraDominanceRules: map[godip.Province]common.DominanceRule{
		"not": common.DominanceRule{
			Nation: England,
			Dependencies: map[godip.Province]godip.Nation{
				"dev": England,
				"sco": godip.Neutral,
			},
		},
		"anj": common.DominanceRule{
			Nation: France,
			Dependencies: map[godip.Province]godip.Nation{
				"orl": France,
				"nom": England,
				"brt": godip.Neutral,
			},
		},
		"poi": common.DominanceRule{
			Nation: France,
			Dependencies: map[godip.Province]godip.Nation{
				"tou": France,
				"orl": France,
				"guy": England,
			},
		},
		"cha": common.DominanceRule{
			Nation: Burgundy,
			Dependencies: map[godip.Province]godip.Nation{
				"dij": Burgundy,
				"par": France,
				"dau": France,
			},
		},
	},
	Nations:           Nations,
	PhaseTypes:        classical.PhaseTypes,
	Seasons:           []godip.Season{YearSeason},
	UnitTypes:         classical.UnitTypes,
	SoloWinner:        common.SCCountWinner(9),
	ProvinceLongNames: provinceLongNames,
	SVGMap: func() ([]byte, error) {
		return Asset("svg/hundredmap.svg")
	},
	SVGVersion: "6",
	SVGUnits:   SVGUnits,
	SVGFlags: map[godip.Nation]func() ([]byte, error){
		England: func() ([]byte, error) {
			return Asset("svg/England.svg")
		},
		Burgundy: func() ([]byte, error) {
			return Asset("svg/Burgundy.svg")
		},
		France: func() ([]byte, error) {
			return Asset("svg/France.svg")
		},
	},
	CreatedBy:   "Andy Schwarz",
	Version:     "3",
	Description: "The Hundred Years' War was a series of conflicts from 1337 to 1453, waged between the English House of Plantagenet and the French House of Valois, over the Kingdom of France.",
	SoloSCCount: func(*state.State) int { return 9 },
	Rules: `First to 9 Supply Centers (SC) is the winner.
Units may be built on any owned SC.
France starts with 5 units and 4 SCs, so needs to disband unless they gain a center before 1430.
Yearly cycles of Spring & Fall are renamed to decade cycles with years ending with 5 and 0 respectively.
Armies & fleets can move between London & Calais.
Two provinces have dual coasts: Northumbria and Aragon.`,
}
View Source
var SVGUnits = map[godip.UnitType]func() ([]byte, error){
	godip.Army: func() ([]byte, error) {
		return Asset("svg/army.svg")
	},
	godip.Fleet: func() ([]byte, error) {
		return Asset("svg/fleet.svg")
	},
}

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func HundredBlank

func HundredBlank(phase godip.Phase) *state.State

func HundredGraph

func HundredGraph() *graph.Graph

func HundredStart

func HundredStart() (result *state.State, err error)

func Phase

func Phase(year int, season godip.Season, typ godip.PhaseType) godip.Phase

Types

This section is empty.

Jump to

Keyboard shortcuts

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