Example #1
0
func Start() (result *state.State, err error) {
	result = state.New(start.Graph(), &phase{1901, cla.Spring, cla.Movement}, BackupRule)
	if err = result.SetUnits(start.Units()); err != nil {
		return
	}
	result.SetSupplyCenters(start.SupplyCenters())
	return
}
Example #2
0
File: datc.go Project: arlm/godip
func init() {
	for _, prov := range start.Graph().Provinces() {
		datcProvinces[string(prov)] = prov
	}
}
Example #3
0
func Blank(phase dip.Phase) *state.State {
	return state.New(start.Graph(), phase, BackupRule)
}
Example #4
0
}

var Variants = map[string]Variant{}

var OrderedVariants = []Variant{
	Variant{
		Name:  Classical,
		Start: classical.Start,
		Blank: classical.Blank,
		BlankStart: func() (result *state.State, err error) {
			result = classical.Blank(classical.Phase(1900, cla.Fall, cla.Adjustment))
			return
		},
		ParseOrders: orders.ParseAll,
		ParseOrder:  orders.Parse,
		Graph:       start.Graph(),
		Phase:       classical.Phase,
		OrderTypes:  orders.OrderTypes(),
		Nations:     cla.Nations,
		PhaseTypes:  cla.PhaseTypes,
		Seasons:     cla.Seasons,
		UnitTypes:   cla.UnitTypes,
	},
	Variant{
		Name:  FleetRome,
		Graph: start.Graph(),
		Start: func() (result *state.State, err error) {
			if result, err = classical.Start(); err != nil {
				return
			}
			result.RemoveUnit(dip.Province("rom"))