Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetNames() []string
- func HundredBlank(phase godip.Phase) *state.State
- func HundredGraph() *graph.Graph
- func HundredStart() (result *state.State, err error)
- func Phase(year int, season godip.Season, typ godip.PhaseType) godip.Phase
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 BuildAnywhereParser = orders.NewParser([]godip.Order{ orders.MoveOrder, orders.MoveViaConvoyOrder, orders.HoldOrder, orders.SupportOrder, orders.BuildAnywhereOrder, orders.DisbandOrder, orders.ConvoyOrder, })
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.`, }
Functions ¶
func Asset ¶
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 ¶
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 HundredGraph ¶
func HundredStart ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.