diff --git a/src/apps/day14/src/strategies/ECSStrategy.h b/src/apps/day14/src/strategies/ECSStrategy.h index a961f0c..e545c6b 100644 --- a/src/apps/day14/src/strategies/ECSStrategy.h +++ b/src/apps/day14/src/strategies/ECSStrategy.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "core/AssetStore.h" @@ -23,7 +24,7 @@ std::string filePath = "assets/input.txt"; class MinimalLoopStrategy : public Core::IStrategy { public: - float scale = 10.0f; + float scale = 20.0f; int numRows = 0; int numCols = 0; @@ -198,18 +199,18 @@ class MinimalLoopStrategy : public Core::IStrategy { Core::Window& window, Core::Renderer& renderer, double deltaTime ) override { - ECS::Registry::Instance().GetSystem().Update(1); + for (int column = 0; column < numCols; column++) { + auto future = std::async( + std::launch::async, + &CollisionSystem::Update, + &ECS::Registry::Instance().GetSystem(), + column + ); + } ECS::Registry::Instance().GetSystem().Update(); ECS::Registry::Instance().Update(); - - // ECS::Registry::Instance() - // .GetSystem() - // .CalculateSumOfAllParts(puzzleSolverEntity1.value()); - // ECS::Registry::Instance() - // .GetSystem() - // .CalculateSumAllGearRatios(puzzleSolverEntity2.value()); } void OnRender(Core::Window& window, Core::Renderer& renderer) override {