#include "Player/Player.h"

Action::Status Player::makeAction(const BattleField& battleField) {
    std::unique_ptr<Action> action = chooseAction(battleField);
    if (action->type() == Action::Type::Attack) {
        Ship* enemyShip = chooseEnemyShip(battleField);
        return (*action)(this, enemyShip);
    }

    return (*action)(this, nullptr);
}