WormAIDev  Worm SELF_VERSION
 All Classes Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
WormPlanner Class Reference

Define the WormPlanner class which handles planning. More...

Public Member Functions

constructor WormPlanner (rail_manager)
function GetSubsidizedRoute (planned_route)
 Choose a subsidy if there is one available that suits us.
function GetRoute (planned_route)
 Find a cargo, a source and a destination to build a new service.
function PlanRailRoute ()
 Plan a rail route.

Static Public Member Functions

static function GetMailCargo ()
 Gets the CargoID associated with mail.

Public Attributes

 route = null
 Details about the route we planned.

Detailed Description

Define the WormPlanner class which handles planning.

Member Function Documentation

function WormPlanner::GetMailCargo ( )
static

Gets the CargoID associated with mail.

Note
Taken from SimpleAI.
Returns
The CargoID of mail.
The CargoID of mail.
function WormPlanner::GetRoute ( planned_route  )

Find a cargo, a source and a destination to build a new service.

Builder class variables set: crglist, crg, srclist, src, dstlist, dst, srcistown, dstistown, srcplace, dstplace

Returns
True if a potential connection was found.
Todo:
!!
Todo:
adapt this value (40) move it to a constant or var
Todo:
change to const
function WormPlanner::GetSubsidizedRoute ( planned_route  )

Choose a subsidy if there is one available that suits us.

Parameters
planned_routeA WormRoute class that will receive details about the planned route.
Returns
True if a subsidy was chosen.
Precondition
planned_route should be a valid WormRoute object.
Todo:
Instead of GetSetting we should define a value for ourselves...
function WormPlanner::PlanRailRoute ( )

Plan a rail route.

Returns
True if we managed to find a route.
Todo:
replace number by a definied constant

The documentation for this class was generated from the following file: