NonPlayerAgent class - truewis/TitaniumPolitics GitHub Wiki

Routine: each routine has a name, priority, and variables. Routines with greater priority are always run first.

chooseAction: only function called by the game engine.

selectRoutine: run before executeRoutine to determine which routine to run. Note that if there is a routine already running, this function will not do anything unless it is a life-threatening situation that must override the current routine.

executeRoutine: return a GameAction based on the current routine.