#include <Action.h>
Public Member Functions | |
WrestQuaffle ()=default | |
WrestQuaffle (std::shared_ptr< gameModel::Environment > env, std::shared_ptr< gameModel::Chaser > actor, gameModel::Position target) | |
auto | execute () const -> std::pair< std::vector< ActionResult >, std::vector< gameModel::Foul >> |
auto | successProb () const -> double override |
auto | check () const -> ActionCheckResult override |
auto | executeAll () const -> std::vector< std::pair< std::shared_ptr< gameModel::Environment >, double >> override |
![]() | |
Action ()=default | |
Action (std::shared_ptr< gameModel::Environment > env, std::shared_ptr< gameModel::Player > actor, gameModel::Position target) | |
virtual | ~Action ()=default |
const gameModel::Position & | getTarget () const |
Additional Inherited Members | |
![]() | |
std::shared_ptr < gameModel::Player > | actor |
std::shared_ptr < gameModel::Environment > | env |
gameModel::Position | target {} |
class for a the action of wresting the Quaffel from another player.
|
default |
default constructor for the WrestQuaffle class.
gameController::WrestQuaffle::WrestQuaffle | ( | std::shared_ptr< gameModel::Environment > | env, |
std::shared_ptr< gameModel::Chaser > | actor, | ||
gameModel::Position | target | ||
) |
main constructor for the WrestQuaffle class.
env | the environment to operate on |
actor | the acting player (only chaser) as shared pointer. |
target | the target position of the shot. |
|
overridevirtual |
Checks if the Action is possible an if it may result in a foul
Implements gameController::Action.
|
virtual |
executes the Action. Method is not deterministic.
std::runtime_exception | if Action is impossible |
Implements gameController::Action.
|
overridevirtual |
Produces a list with all possible outcomes of the Action and the respective transition probabilities.
Implements gameController::Action.
|
overridevirtual |
Probability that the quaffle is wrested
Implements gameController::Action.