sortiva/src/sortiva/sortiva-update.cpp
noffie a89b27d456
v1.0 (#1)
* init rework

* Update LICENSE

* removing tests

* adding Gui Component system

* added spdlog library

* Fixed input restriction bug

* nothing

* Making the default button stand out

* Setting up run Component

* changing components

* restarted because i cant do it
visualising sorting through value/step diagrams

* g

* working (kinda)

* fixed sqrt comp error

* added debug flag

* abbandoning Lua... Error in runtime

* fixing errors, making cuts

* removing unnessecary dependencies

* Improving UI
2025-01-11 04:18:48 +01:00

22 lines
No EOL
380 B
C++

#include "sortiva.hpp"
void Sortiva::update(double dt) {
if (m_Ticker.update(std::chrono::duration<float>(dt)))
{
if (!m_SortingFinished) {
if (m_Sorter.poll())
{
m_SortingFinished = true;
}
else
{
LuaSortList& list = m_Sorter.get();
for (uint16_t i = 0; i < list.size(); ++i)
{
m_Steps->at(list.at(i) - 1).put(i + 1);
}
}
}
}
}