38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#include <functional>
|
|
#include <iostream>
|
|
#include <memory>
|
|
|
|
#include "Core/Time.h"
|
|
#include "Player/Enemy.h"
|
|
#include "Player/EnemyEasyDifficultLvlStrategy.h"
|
|
#include "Player/EnemyHardDifficultLvlStrategy.h"
|
|
#include "Ship/Cargo.h"
|
|
#include "Ship/Ship.h"
|
|
#include "Ship/ShipEasyDifficultLvlStrategy.h"
|
|
#include "Ship/ShipHardDifficultLvlStrategy.h"
|
|
#include "Store/Store.h"
|
|
|
|
int main() {
|
|
Time time;
|
|
|
|
Ship ship(&time, std::make_unique<ShipHardDifficultLvlStrategy>(), "Black Widow", 1000, 40);
|
|
ship.load(std::make_unique<Alcohol>(300));
|
|
ship.load(std::make_unique<Fruit>(200));
|
|
ship.load(std::make_unique<Fruit>(150));
|
|
ship.printCargo();
|
|
|
|
for (int i = 0; i < 10; ++i) {
|
|
++time;
|
|
std::cout << "\nDAY: " << time.day() << "\n";
|
|
std::cout << "crew: " << ship.crew() << '\n';
|
|
ship.printCargo();
|
|
}
|
|
|
|
std::cout << "\n\n****************************************************\n";
|
|
auto ship2 = std::make_unique<Ship>(&time, std::make_unique<ShipHardDifficultLvlStrategy>(), "Queens Anne revenge", 1000, 40);
|
|
Enemy enemy("Enemy1", std::move(ship2), std::make_unique<EnemyHardDifficultLvlStrategy>());
|
|
|
|
for (int i = 0; i < 15; ++i) {
|
|
enemy.attack(ship);
|
|
}
|
|
}
|