Documentation ¶
Index ¶
- Variables
- func AdjustmentStatus(v godip.Validator, me godip.Nation) (builds godip.Orders, disbands godip.Orders, balance int)
- func AnyConvoyPath(v godip.Validator, src, dst godip.Province, resolveConvoys bool, ...) (result []godip.Province)
- func AnyMovePossible(v godip.Validator, typ godip.UnitType, src, dst godip.Province, ...) (dstCoast godip.Province, err error)
- func AnySupportPossible(v godip.Validator, typ godip.UnitType, src, dst godip.Province) (err error)
- func Build(source godip.Province, typ godip.UnitType, at time.Time) *build
- func BuildAnyHomeCenter(source godip.Province, typ godip.UnitType, at time.Time) *build
- func BuildAnywhere(source godip.Province, typ godip.UnitType, at time.Time) *build
- func Convoy(source, from, to godip.Province) *convoy
- func ConvoyEndPoints(v godip.Validator, startPoint godip.Province, reverse bool, ...) (result []godip.Province)
- func ConvoyParticipationPossible(v godip.Validator, participant, endpoint godip.Province) []godip.Province
- func ConvoyPathPossibleVia(v godip.Validator, via, src, dst godip.Province, resolveConvoys bool) []godip.Province
- func Disband(source godip.Province, at time.Time) *disband
- func HasEdge(v godip.Validator, typ godip.UnitType, src, dst godip.Province) bool
- func Hold(source godip.Province) *hold
- func HoldSupport(r godip.Resolver, prov godip.Province) int
- func Move(source, dest godip.Province) *move
- func MoveSupport(r godip.Resolver, src, dst godip.Province, forbiddenSupports []godip.Nation) int
- func MustConvoy(r godip.Resolver, src godip.Province) bool
- func PossibleConvoyPathFilter(v godip.Validator, src, dst godip.Province, resolveConvoys, dstOk bool) godip.PathFilter
- func PossibleMoves(v godip.Validator, src godip.Province, allowConvoy, dislodged bool) (result []godip.Province)
- func PossibleMovesUnit(v godip.Validator, unitType godip.UnitType, start godip.Province, reverse bool, ...) (result []godip.Province)
- func SupportHold(prov, target godip.Province) *support
- func SupportMove(prov, from, to godip.Province) *support
- type MultiError
- type Parser
- func (self Parser) OrderTypes() (result []godip.OrderType)
- func (self Parser) Orders() (result []godip.Order)
- func (self Parser) Parse(bits []string) (result godip.Adjudicator, err error)
- func (self Parser) ParseAll(orders map[godip.Nation]map[godip.Province][]string) (result map[godip.Province]godip.Adjudicator, err error)
Constants ¶
This section is empty.
Variables ¶
var BuildAnyHomeCenterOrder = &build{ flags: map[godip.Flag]bool{ godip.AnyHomeCenter: true, }, }
var BuildOrder = &build{}
var ConvoyOrder = &convoy{}
var DisbandOrder = &disband{}
var HoldOrder = &hold{}
var MoveOrder = &move{}
var SupportOrder = &support{}
Functions ¶
func AdjustmentStatus ¶
func AnyConvoyPath ¶
func AnyMovePossible ¶
func AnySupportPossible ¶
func BuildAnyHomeCenter ¶
func BuildAnywhere ¶
func ConvoyEndPoints ¶
func ConvoyEndPoints(v godip.Validator, startPoint godip.Province, reverse bool, noConvoy *godip.Province) (result []godip.Province)
ConvoyEndPoints returns all possible end points for a convoy route starting at startPoint. If reverse is false then the route will be for a unit moving from startPoint; if it's true then the route will be for a unit moving to startPoint instead. If noConvoy is set then the route cannot pass through it.
func ConvoyParticipationPossible ¶
func ConvoyParticipationPossible(v godip.Validator, participant, endpoint godip.Province) []godip.Province
ConvoyParticipantionPossible returns a path that participant (assumed to be a fleet at a convoyable position) could send an army to endpoint.
func ConvoyPathPossibleVia ¶
func HoldSupport ¶
HoldSupport returns successful supports of a hold in prov.
func MoveSupport ¶
MoveSupport returns the successful supports of movement from src to dst, discounting the nations in forbiddenSupports.
func PossibleConvoyPathFilter ¶
func PossibleConvoyPathFilter(v godip.Validator, src, dst godip.Province, resolveConvoys, dstOk bool) godip.PathFilter
PossibleConvoyPathFilter returns a path filter for Graph that only accepts nodes that can partake in a convoy from src to dst. If resolveConvoys, then the convoys have to be successful. If dstOk then the dst is acceptable as convoying node.
func PossibleMoves ¶
func PossibleMovesUnit ¶
func PossibleMovesUnit(v godip.Validator, unitType godip.UnitType, start godip.Province, reverse bool, allowConvoy bool, noConvoy *godip.Province) (result []godip.Province)
PossibleMovesUnit returns the possible provinces that a unit can move to or from. If reverse is false then the unit must be in start, and if true then the potential units must be able to move to start. Setting allowConvoy allows convoy routes to be considered, and these must avoid the province noConvoy (if given).
func SupportHold ¶
func SupportMove ¶
Types ¶
type MultiError ¶
type MultiError []error
func (MultiError) Error ¶
func (self MultiError) Error() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}