diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index 72a7992..acafb75 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp @@ -458,6 +458,38 @@ bool BlockGame::hasStaticContent() const { return false; //Return false if no static object found } +void BlockGame::putSampleBlocks() { + //row 0 (hidden): + board[0][0]=0; + board[1][0]=1; + board[2][0]=2; + board[3][0]=3; + board[4][0]=4; + board[5][0]=5; + //row 1: + board[0][1]=0; + board[1][1]=1; + board[2][1]=2; + board[3][1]=3; + board[4][1]=4; + board[5][1]=5; + //row 2+: + board[0][2]=6; + board[0][3]=1; + board[0][4]=2; + for ( size_t i = 0; i < 4; i++) { + board[i][5]=GARBAGE; + } + for (size_t i = 0; i < 6; i++) { + for (size_t j = 6; j < 9; j++) { + board[i][j] = GARBAGE+1; + } + for (size_t j = 9; j < 12; j++) { + board[i][j] = GARBAGE+2; + } + } +} + void BlockGame::putStartBlocks() { putStartBlocks(time(0)); } diff --git a/source/code/BlockGame.hpp b/source/code/BlockGame.hpp index e09acfc..ed5d766 100644 --- a/source/code/BlockGame.hpp +++ b/source/code/BlockGame.hpp @@ -261,6 +261,7 @@ public: const BlockGameInfo& GetBlockGameInfo() { return replayInfo; } + void putSampleBlocks(); private: void NewGameInternal(unsigned int ticks); //Test if LineNr is an empty line, returns false otherwise. diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index 56a655b..62df59a 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp @@ -446,6 +446,7 @@ private: public: ThemesMenu(SDL_Renderer* screen, const std::string& title, bool submenu) : Menu(screen, title, submenu) { game = std::make_shared(1024-500,100,&globalData.spriteHolder->GetDataHolder()); + game->putSampleBlocks(); } void placeButtons() {