WormAIDev  Worm SELF_VERSION
 All Classes Files Functions Variables Pages
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.

Public Attributes

 route = null
 Details about the route we planned.

Detailed Description

Define the WormPlanner class which handles planning.

Member Function Documentation

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...

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