#include <functional>
#include <iostream>
#include <memory>

#include "Battle/BattleField.h"
#include "Core/BasicPrintVisitor.h"
#include "Core/FullInfoPrintVisitor.h"
#include "Core/PrettyPrintVisitor.h"
#include "Core/Time.h"
#include "Player/Enemy.h"
#include "Player/EnemyEasyDifficultLvlStrategy.h"
#include "Player/EnemyHardDifficultLvlStrategy.h"
#include "Player/RealPlayer.h"
#include "Ship/AlcoholFactory.h"
#include "Ship/AlcoholType.h"
#include "Ship/Cargo.h"
#include "Ship/CargoDamageVisitor.h"
#include "Ship/FruitFactory.h"
#include "Ship/ItemFactory.h"
#include "Ship/ItemType.h"
#include "Ship/Ship.h"
#include "Ship/ShipBuilder.h"
#include "Ship/ShipEasyDifficultLvlStrategy.h"
#include "Ship/ShipHardDifficultLvlStrategy.h"
#include "Ship/ShipJsonBuilder.h"
#include "Ship/Valuable.h"
#include "Ship/Vulnerable.h"
#include "Store/Store.h"

int main() {
    Time time;

    auto ship = ShipBuilder()
                    .setTime(&time)
                    .setName("Black Widow")
                    .setCapacity(2500)
                    .setCrew(40)
                    .setStrategy(std::make_unique<ShipHardDifficultLvlStrategy>())
                    .setVisitor(std::make_unique<FullInfoPrintVisitor>())
                    .setArmor(100)
                    .setDurability(1000)
                    .build();
    ship->load(std::make_unique<Valuable<AlcoholType>>(AlcoholFactory().create(800, 40), AlcoholType::Seasoned));
    ship->load(std::make_unique<Vulnerable>(FruitFactory().create(500), &time, 15, 15));
    ship->load(std::make_unique<Vulnerable>(FruitFactory().create(700), &time, 20, 20));
    ship->load(std::make_unique<Vulnerable>(std::make_unique<Valuable<ItemType>>(ItemFactory().create(250), ItemType::Epic), &time, 100, 100));

    for (size_t i = 1; i <= 15; ++i) {
        std::cout << "day: " << i << '\n';
        ship->printCargo();
        ++time;
    }
}
