Thunderbots Project
Loading...
Searching...
No Matches
ShootOrPassPlayFSM Struct Reference

Classes

struct  ControlParams
 

Public Member Functions

DEFINE_PLAY_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS ShootOrPassPlayFSM (const TbotsProto::AiConfig &ai_config)
 
void updateOffensivePositioningTactics (const WorldPtr world, unsigned int num_tactics, const std::vector< Point > &existing_receiver_positions={}, const std::optional< Point > &pass_origin_override=std::nullopt)
 
void lookForPass (const Update &event)
 
void startLookingForPass (const Update &event)
 
void takePass (const Update &event)
 
bool passFound (const Update &event)
 
bool shouldAbortPass (const Update &event)
 
bool passCompleted (const Update &event)
 
bool tookShot (const Update &event)
 
auto operator() ()
 

Constructor & Destructor Documentation

◆ ShootOrPassPlayFSM()

ShootOrPassPlayFSM ( const TbotsProto::AiConfig &  ai_config)
explicit

Creates a shoot or pass play FSM

Parameters
ai_configthe play config for this play FSM

Member Function Documentation

◆ lookForPass()

void lookForPass ( const Update &  event)

Action that looks for a pass

Parameters
eventthe ShootOrPassPlayFSM Update event

◆ passCompleted()

bool passCompleted ( const Update &  event)

Guard on whether the pass has completed

Parameters
eventthe ShootOrPassPlayFSM Update event
Returns
whether the pass has completed

◆ passFound()

bool passFound ( const Update &  event)

Guard to check if a pass has been found

Parameters
eventthe ShootOrPassPlayFSM Update event
Returns
whether a pass has been found

◆ shouldAbortPass()

bool shouldAbortPass ( const Update &  event)

Guard on whether to abort the pass

Parameters
eventthe ShootOrPassPlayFSM Update event
Returns
whether the pass should be aborted

◆ startLookingForPass()

void startLookingForPass ( const Update &  event)

Action to restart looking for a pass

Parameters
eventthe ShootOrPassPlayFSM Update event

◆ takePass()

void takePass ( const Update &  event)

Action to take a pass

Parameters
eventthe ShootOrPassPlayFSM Update event

◆ tookShot()

bool tookShot ( const Update &  event)

Guard on whether a shot has been taken

Parameters
eventthe ShootOrPassPlayFSM Update event
Returns
whether the shot has been taken

◆ updateOffensivePositioningTactics()

void updateOffensivePositioningTactics ( const WorldPtr  world,
unsigned int  num_tactics,
const std::vector< Point > &  existing_receiver_positions = {},
const std::optional< Point > &  pass_origin_override = std::nullopt 
)

Updates the offensive positioning tactics

Parameters
worldthe world
num_tacticsthe number of tactics to assign
existing_receiver_positionsA set of positions of existing receiver positions that should be taken into account when assigning additional offensive tactics.
pass_origin_overrideAn optional point that the pass origin should be overridden to

The documentation for this struct was generated from the following files: