Documentation ¶
Overview ¶
Code generated by go-bindata. (@generated) DO NOT EDIT. sources: svg/twentytwentymap.svg
Index ¶
- Constants
- Variables
- 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
- func TwentyTwentyBlank(phase godip.Phase) *state.State
- func TwentyTwentyGraph() *graph.Graph
- func TwentyTwentyStart() (result *state.State, err error)
- func TwentyTwentyWinner(s *state.State) godip.Nation
Constants ¶
const ( Brazil godip.Nation = "Brazil" Canada godip.Nation = "Canada" Australia godip.Nation = "Australia" Italy godip.Nation = "Italy" USA godip.Nation = "USA" Kenya godip.Nation = "Kenya" Egypt godip.Nation = "Egypt" Thailand godip.Nation = "Thailand" Turkey godip.Nation = "Turkey" SouthAfrica godip.Nation = "South Africa" India godip.Nation = "India" Russia godip.Nation = "Russia" Pakistan godip.Nation = "Pakistan" China godip.Nation = "China" UK godip.Nation = "UK" Japan godip.Nation = "Japan" Germany godip.Nation = "Germany" Argentina godip.Nation = "Argentina" Nigeria godip.Nation = "Nigeria" Spain godip.Nation = "Spain" )
Variables ¶
var BuildAnyHomeCenterParser = orders.NewParser([]godip.Order{ orders.MoveOrder, orders.MoveViaConvoyOrder, orders.HoldOrder, orders.SupportOrder, orders.BuildAnyHomeCenterOrder, orders.DisbandOrder, orders.ConvoyOrder, })
var Nations = []godip.Nation{Brazil, Canada, Australia, Italy, USA, Kenya, Egypt, Thailand, Turkey, SouthAfrica, India, Russia, Pakistan, China, UK, Japan, Germany, Argentina, Nigeria, Spain}
var Phase = phase.Generator(BuildAnyHomeCenterParser, classical.AdjustSCs)
var TwentyTwentyVariant = common.Variant{ Name: "Twenty Twenty", Graph: func() godip.Graph { return TwentyTwentyGraph() }, Start: TwentyTwentyStart, Blank: TwentyTwentyBlank, Phase: Phase, Parser: BuildAnyHomeCenterParser, Nations: Nations, PhaseTypes: classical.PhaseTypes, Seasons: classical.Seasons, UnitTypes: classical.UnitTypes, SoloWinner: TwentyTwentyWinner, SVGMap: func() ([]byte, error) { return Asset("svg/twentytwentymap.svg") }, SVGVersion: "6", SVGUnits: map[godip.UnitType]func() ([]byte, error){ godip.Army: func() ([]byte, error) { return classical.Asset("svg/army.svg") }, godip.Fleet: func() ([]byte, error) { return classical.Asset("svg/fleet.svg") }, }, CreatedBy: "TTTPPP", Version: "1", Description: "Twenty nations compete to conquer the world by the year 2020.", Rules: "The rules are mostly standard. Nations may build in any captured " + "home centers (note - they may not build in captured neutral supply " + "centers). To win a nation needs to own more supply centers than any " + "opponent. In the first year they need 20 more supply centers than any " + "other player, but this target is reduced by 1 each year. So to win in " + "the year 2015 a player needs at least 6 more supply centers than any " + "other player, and in 2020 and beyond they need a lead of a single " + "supply center. Alternatively, if a player manages to get to 49 centers " + "(i.e. they own over half the map) then they automatically win. The " + "game can only be won in the adjustment phase at the end of a year. There " + "are six bridges connecting regions for armies (and fleets). These are " + "Anchorage-Vladivostok, New Orleans-Cuba, Cuba-Dominican Republic, " + "Ethiopia-Yemen, Korea-Nagisaki and Indonesia-Darwin. Thirteen regions " + "have multiple coasts. These are Whitehorse, Los Angeles, Mexico, " + "Colombia, Bordeaux, Milan, Rome, Finland, Bulgaria, Ankara, Iraq, " + "Mecca and Shanyang.", }
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
func TwentyTwentyGraph ¶
func TwentyTwentyStart ¶
Types ¶
This section is empty.