Documentation ¶
Overview ¶
Code generated by go-bindata. (@generated) DO NOT EDIT. sources: svg/army.svg svg/fleet.svg svg/map.svg
Index ¶
- Variables
- func AdjustSCs(phase *phase.Phase) bool
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func BackupRule(state godip.State, deps []godip.Province) (err error)
- func Blank(phase godip.Phase) *state.State
- func DATCNation(typ string) (result godip.Nation, err error)
- func DATCOrder(text string) (province godip.Province, order godip.Adjudicator, err error)
- func DATCPhase(season string, year int, typ string) (result godip.Phase, err error)
- func DATCProvince(n string) (result godip.Province, err error)
- func DATCUnitType(typ string) (result godip.UnitType, err error)
- func MustAsset(name string) []byte
- func NewPhase(year int, season godip.Season, typ godip.PhaseType) godip.Phase
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func Start() (result *state.State, err error)
Constants ¶
This section is empty.
Variables ¶
var ( Nations = []godip.Nation{godip.Austria, godip.England, godip.France, godip.Germany, godip.Italy, godip.Turkey, godip.Russia} PhaseTypes = []godip.PhaseType{godip.Movement, godip.Retreat, godip.Adjustment} Seasons = []godip.Season{godip.Spring, godip.Fall} UnitTypes = []godip.UnitType{godip.Army, godip.Fleet} Parser = orders.NewParser([]godip.Order{ orders.BuildOrder, orders.ConvoyOrder, orders.DisbandOrder, orders.HoldOrder, orders.MoveOrder, orders.MoveViaConvoyOrder, orders.SupportOrder, }) )
var ClassicalVariant = common.Variant{ Name: "Classical", Start: Start, Blank: Blank, BlankStart: func() (result *state.State, err error) { result = Blank(NewPhase(1900, godip.Fall, godip.Adjustment)) return }, Parser: Parser, Graph: func() godip.Graph { return start.Graph() }, Phase: NewPhase, Nations: Nations, PhaseTypes: PhaseTypes, Seasons: Seasons, UnitTypes: UnitTypes, SoloWinner: common.SCCountWinner(18), SVGMap: func() ([]byte, error) { return Asset("svg/map.svg") }, SVGVersion: "5", 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: "Allan B. Calhamer", Version: "", Description: "The original game of Diplomacy.", Rules: "The first to 18 supply centers is the winner. See the Wikibooks article for how to play: https://en.wikibooks.org/wiki/Diplomacy/Rules", }
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.