added rlutil.h
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user