#include <Action.h>
Public Member Functions | |
| Move ()=default | |
| Move (std::shared_ptr< gameModel::Environment > env, std::shared_ptr< gameModel::Player > actor, gameModel::Position target) | |
| auto | execute () const -> std::pair< std::vector< ActionResult >, std::vector< gameModel::Foul >> override |
| auto | successProb () const -> double override |
| auto | check () const -> ActionCheckResult override |
| auto | executeAll () const -> std::vector< std::pair< std::shared_ptr< gameModel::Environment >, double >> override |
| auto | checkForFoul () const -> std::vector< gameModel::Foul > |
Public Member Functions inherited from gameController::Action | |
| 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 | |
Protected Attributes inherited from gameController::Action | |
|
std::shared_ptr < gameModel::Player > | actor |
|
std::shared_ptr < gameModel::Environment > | env |
| gameModel::Position | target {} |
class for a move in the game
|
default |
default constructor for the Move Class.
| gameController::Move::Move | ( | std::shared_ptr< gameModel::Environment > | env, |
| std::shared_ptr< gameModel::Player > | actor, | ||
| gameModel::Position | target | ||
| ) |
main constructor for the Move class.
| env | the environment to operate on |
| actor | the acting player or ball as shared pointer. |
| target | the target position of the move. |
|
overridevirtual |
Checks if the Action is possible an if it may result in a foul
Implements gameController::Action.
| auto gameController::Move::checkForFoul | ( | ) | const -> std::vector<gameModel::Foul> |
checks if the move is a foul.
|
overridevirtual |
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 actor will land on target cell and is not banned for commiting a foul
Implements gameController::Action.
1.8.6