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

#include <shoot_or_chip_play.h>

Inheritance diagram for ShootOrChipPlay:
Collaboration diagram for ShootOrChipPlay:

Public Member Functions

 ShootOrChipPlay (TbotsProto::AiConfig config)
 
void getNextTactics (TacticCoroutine::push_type &yield, const WorldPtr &world_ptr) override
 
- Public Member Functions inherited from Play
 Play (TbotsProto::AiConfig ai_config, bool requires_goalie)
 
virtual std::unique_ptr< TbotsProto::PrimitiveSet > get (const WorldPtr &world_ptr, const InterPlayCommunication &inter_play_communication, const SetInterPlayCommunicationCallback &set_inter_play_communication_fun)
 
const std::map< std::shared_ptr< const Tactic >, RobotId > & getTacticRobotIdAssignment () const
 
virtual std::vector< std::string > getState ()
 

Additional Inherited Members

- Protected Member Functions inherited from Play
virtual void updateTactics (const PlayUpdate &play_update)
 
- Protected Attributes inherited from Play
TbotsProto::AiConfig ai_config
 
std::shared_ptr< GoalieTacticgoalie_tactic
 
std::map< std::shared_ptr< const Tactic >, RobotId > tactic_robot_id_assignment
 
std::map< RobotId, TrajectoryPathrobot_trajectories
 
TbotsProto::ObstacleList obstacle_list
 
TbotsProto::PathVisualization path_visualization
 

Detailed Description

The Defense Play tries to grab the ball from the enemy that has it, and all other robots shadow the enemy robots in order of how threatening they are.

Member Function Documentation

◆ getNextTactics()

void getNextTactics ( TacticCoroutine::push_type &  yield,
const WorldPtr &  world_ptr 
)
overridevirtual

This function yields a list of shared_ptrs to the Tactics the Play wants to run at this time, in order of priority. This yield happens in place of a return.

TODO (#2359): delete once all plays are not coroutines

Parameters
yieldThe coroutine push_type for the Play
worldThe current state of the world

Our general strategy here is:

  • 1 goalie
  • 2 crease defenders moving around the friendly defense box
  • 2 robots moving into the first and second largest open free space on the enemy half
  • 1 robot trying to shoot on the goal. If an enemy gets too close to this robot, it will chip to right in front of the robot in the largest open free area

Implements Play.


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