Thunderbots Project
Loading...
Searching...
No Matches
AttackerTactic Class Reference

#include <attacker_tactic.h>

Inheritance diagram for AttackerTactic:
Collaboration diagram for AttackerTactic:

Public Member Functions

 AttackerTactic (TbotsProto::AiConfig ai_config)
 
void updateControlParams (const Pass &best_pass_so_far, bool pass_committed)
 
void updateControlParams (std::optional< Point > chip_target)
 
void accept (TacticVisitor &visitor) const override
 
- Public Member Functions inherited from Tactic
 Tactic (const std::set< RobotCapability > &capability_reqs_)
 
virtual bool done () const =0
 
virtual std::string getFSMState () const =0
 
const std::set< RobotCapability > & robotCapabilityRequirements () const
 
std::set< RobotCapability > & mutableRobotCapabilityRequirements ()
 
void setLastExecutionRobot (std::optional< RobotId > last_execution_robot)
 
std::map< RobotId, std::shared_ptr< Primitive > > get (const WorldPtr &world_ptr)
 

Additional Inherited Members

- Protected Attributes inherited from Tactic
std::optional< RobotId > last_execution_robot
 

Detailed Description

This tactic is for a robot performing a pass. It should be used in conjunction with the ReceiverTactic in order to complete the pass.

Note that this tactic does not take into account the time the pass should occur at, it simply tries to move to the best position to take the pass as fast as possible

Constructor & Destructor Documentation

◆ AttackerTactic()

AttackerTactic ( TbotsProto::AiConfig  ai_config)
explicit

Creates a new AttackerTactic

Parameters
ai_configThe AI configuration

Member Function Documentation

◆ accept()

void accept ( TacticVisitor visitor) const
overridevirtual

Accepts a Tactic Visitor and calls the visit function on itself

Parameters
visitorA Tactic Visitor

Implements Tactic.

◆ updateControlParams() [1/2]

void updateControlParams ( const Pass best_pass_so_far,
bool  pass_committed 
)

Updates the control parameters for this AttackerTactic.

Parameters
updated_passThe pass to perform

◆ updateControlParams() [2/2]

void updateControlParams ( std::optional< Point chip_target)

Updates the control parameters for this AttackerTactic

Parameters
chip_targetAn optional point that the robot will chip towards when it is unable to shoot and is in danger of losing the ball to an enemy. If this value is not provided, the point defaults to the enemy goal

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