#define OLC_PGE_APPLICATION #include "pixelGameEngine.h" #include "olcutils.h" #include using namespace olc; std::array,30000000>playfieldRows; int main() { std::ifstream file("testinput"); std::array,4>piece{{ {' ',' ',' ',' '}, {' ',' ',' ',' '}, {' ',' ',' ',' '}, {' ',' ',' ',' '}}}; vi2d piecePos={0,0}; std::array,4>,vi2d>,5>pieces{{ {{{{'#','#','#','#'}, {' ',' ',' ',' '}, {' ',' ',' ',' '}, {' ',' ',' ',' '}}},{4,1}}, {{{{' ','#',' ',' '}, {'#','#','#',' '}, {' ','#',' ',' '}, {' ',' ',' ',' '}}},{3,3}}, {{{{' ',' ','#',' '}, {' ',' ','#',' '}, {'#','#','#',' '}, {' ',' ',' ',' '}}},{3,3}}, {{{{'#',' ',' ',' '}, {'#',' ',' ',' '}, {'#',' ',' ',' '}, {'#',' ',' ',' '}}},{1,4}}, {{{{'#','#',' ',' '}, {'#','#',' ',' '}, {' ',' ',' ',' '}, {' ',' ',' ',' '}}},{2,2}},}}; int currentPiece=0; int topRow=playfieldRows.size(); int stackSize=0; int jetMarker=0; std::cout<<"Initializing array..."<0){ std::cout<,4>,vi2d>piece=pieces[currentPiece]; currentPiece=(currentPiece+1)%5; int newRows=3-topRow+piece.second.y; //std::cout<<"Adding "<0){ for (int yy=0;yy':{ if (piecePos.x+piece.second.x<7){ for (int yy=0;yy=piecePos.x&&y>=piecePos.y&&x-1