#define _GNU_SOURCE #include #include #include #include #include #include #include "screenbuffer.h" using namespace std; static void initTerminal(){ cout<<"\x1B[?1049h" // start alternate screen "\x1B[2J" // clear screen "\x1B[H" // move to top left <=0&&x=0&&y