#include #include #include #include #include namespace kurator { namespace battles { Battle::Battle(Scenario scenario) { std::random_device dev; std::uniform_real_distribution<> pos{-5.0, 5.0}; for (const auto& ship : scenario.ships) { const auto entity = registry.create(); registry.emplace(entity, ship.type); registry.emplace(entity, ship.team); registry.emplace(entity, Point{pos(dev), pos(dev)}, Point{0.0, 0.0}); } } } // namespace battles } // namespace kurator