Documentation ¶
Index ¶
- Constants
- Variables
- func AncientMediterraneanBlank(phase godip.Phase) *state.State
- func AncientMediterraneanGraph() *graph.Graph
- func AncientMediterraneanStart() (result *state.State, err error)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
Constants ¶
Variables ¶
var AncientMediterraneanVariant = common.Variant{ Name: "Ancient Mediterranean", Graph: func() godip.Graph { return AncientMediterraneanGraph() }, Start: AncientMediterraneanStart, Blank: AncientMediterraneanBlank, Phase: classical.NewPhase, Parser: classical.Parser, Nations: Nations, PhaseTypes: classical.PhaseTypes, Seasons: classical.Seasons, UnitTypes: classical.UnitTypes, SoloWinner: common.SCCountWinner(18), SVGMap: func() ([]byte, error) { return Asset("svg/ancientmediterraneanmap.svg") }, SVGVersion: "6", ProvinceLongNames: provinceLongNames, 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") }, }, CreatedBy: "Don Hessong", Version: "", Description: "Five historical nations battle for dominance of the Mediterranean.", SoloSCCount: func(*state.State) int { return 18 }, Rules: `First to 18 Supply Centers (SC) is the winner. Baleares is an archipelago that can be occupied by armies or fleets. Armies can’t move directly from the mainland to Baleares, and a fleet in Baleares can form part of a convoy chain. The canal between Athens and Sparta is passable for armies (thus Athens has a single coast). The same is true for the canals in Byzantium, the Sicilian Straits and the River Nile. There is a four-way connection between the Ausonian Sea, Messenian Sea, Gulf of Tacape and Libyan Sea. There is another four-way connection between Alexandria, Sinai, Thebes and the Gulf of Pelusium.`, }
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 AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
This section is empty.