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

#include <crease_defender_tactic.h>

Inheritance diagram for CreaseDefenderTactic:
Collaboration diagram for CreaseDefenderTactic:

Public Member Functions

 CreaseDefenderTactic (TbotsProto::AiConfig ai_config)
 
DEFINE_TACTIC_DONE_AND_GET_FSM_STATE void updateControlParams (const Point &enemy_threat_origin, const TbotsProto::CreaseDefenderAlignment &alignment, TbotsProto::MaxAllowedSpeedMode max_allowed_speed_mode=TbotsProto::MaxAllowedSpeedMode::PHYSICAL_LIMIT, TbotsProto::BallStealMode ball_steal_mode=TbotsProto::BallStealMode::STEAL)
 
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

A crease defender moves around the exterior of our defense box to help shadow shots against the enemy

                   XX   <-- Enemy
                   XX
                     O  <-- Ball



                      ++   ++   <--- Two crease defenders
                      ++   ++

                  +--------------------+
                  |                    |
                  |         ++         |
                  |         ++    <-- Goalie

+-------------------—+------—++------—+---------------—+

Constructor & Destructor Documentation

◆ CreaseDefenderTactic()

CreaseDefenderTactic ( TbotsProto::AiConfig  ai_config)
explicit

Creates a new CreaseDefenderTactic

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()

void updateControlParams ( const Point enemy_threat_origin,
const TbotsProto::CreaseDefenderAlignment &  alignment,
TbotsProto::MaxAllowedSpeedMode  max_allowed_speed_mode = TbotsProto::MaxAllowedSpeedMode::PHYSICAL_LIMIT,
TbotsProto::BallStealMode  ball_steal_mode = TbotsProto::BallStealMode::STEAL 
)

Update control params for this tactic

Parameters
enemy_threat_originThe origin of the enemy threat
alignmentThe alignment for this crease defender
max_allowed_speed_modeThe mode of maximum speed allowed
ball_steal_modeThe mode of ball stealing to follow

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