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

Classes

struct  ControlParams
 

Public Member Functions

DEFINE_PLAY_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS OffensePlayFSM (TbotsProto::AiConfig ai_config)
 
bool enemyHasPossession (const Update &event)
 
void setupOffensiveStrategy (const Update &event)
 
void setupDefensiveStrategy (const Update &event)
 
void setTactics (const Update &event, int num_shoot_or_pass, int num_defenders)
 
auto operator() ()
 

Constructor & Destructor Documentation

◆ OffensePlayFSM()

OffensePlayFSM ( TbotsProto::AiConfig  ai_config)
explicit

Creates an offense play FSM

Parameters
ai_configthe play config for this play FSM

Member Function Documentation

◆ enemyHasPossession()

bool enemyHasPossession ( const Update &  event)

Guard to check whether the enemy team has possession of the ball

Parameters
eventthe FSM event
Returns
whether the enemy team has possession of the ball

◆ setTactics()

void setTactics ( const Update &  event,
int  num_shoot_or_pass,
int  num_defenders 
)

Helper function to set the tactics for the play depending on the specified number of attackers and defenders to setup

Parameters
eventthe FSM event
num_shoot_or_passthe number of attackers (ShootOrPassPlay)
num_defendersthe number of defenders (DefensePlay)

◆ setupDefensiveStrategy()

void setupDefensiveStrategy ( const Update &  event)

Action to configure the play for defensive gameplay

Parameters
eventthe FSM event

◆ setupOffensiveStrategy()

void setupOffensiveStrategy ( const Update &  event)

Action to configure the play for offensive gameplay

Parameters
eventthe FSM event

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