added rlutil.h

This commit is contained in:
2019-11-05 23:02:16 -07:00
parent 41c1116d22
commit 9204af78c9
109 changed files with 4146 additions and 532 deletions

View File

@@ -3,3 +3,24 @@
//
#include "RendererConsole.hpp"
void RendererConsole::render(const LifeSimulator& simulation)
{
rlutil::hidecursor();
rlutil::cls();
std::uint8_t y = simulation.getSizeY();
std::uint8_t x = simulation.getSizeX();
for (std::uint8_t i = 0; i < y; i++)
{
for (std::uint8_t j = 0; j < x; j++)
{
if (simulation.getCell(j, i))
{
rlutil::locate(j + 1, i + 1);
rlutil::setChar('X');
}
}
}
rlutil::showcursor();
}