void logicButtons(bool temp[]) { for (int i = 0; i < NUMBER_OF_BUTTON; ++i) { if (temp[i] == true) { switch (i) { case 0: if(!lockButtons) { startStopGame(); } temp[i] = false; break; case 1: if(!lockButtons) { setToDefault(); loadGame(board); if(availableMatches() == 0) { startStopGame(); } } temp[i] = false; break; case 2: showHelp(); temp[i] = false; break; case 3: startStopSound(); temp[i] = false; break; } } } }
void logicButtons(bool temp[]) { for (int i = 0; i < NUMBER_OF_BUTTON; ++i) { if (temp[i] == true) { switch (i) { case 0: printf("start function \n"); startStopTimer(); startStopGame(); temp[i] = false; break; case 1: printf("save function \n"); temp[i] = false; break; case 2: printf("load function \n"); temp[i] = false; break; case 3: printf("help function \n"); showHelp(); temp[i] = false; break; } } } }
void GameApplication::logicButtons(bool temp[]) { for (int i = 0; i < NUMBER_OF_BUTTON; ++i) { if (temp[i] == true) { switch (i) { case 0: if (!lockButtons) { startStopGame(); } if (chunk) { Mix_PlayChannel(-1, click, 0); } temp[i] = false; break; case 1: if (!lockButtons) { setToDefault(); loadGame(board); if (availableMatches() == 0) { startStopGame(); } } if (chunk) { Mix_PlayChannel(-1, click, 0); } temp[i] = false; break; case 2: showHelp(); if (chunk) { Mix_PlayChannel(-1, click, 0); } temp[i] = false; break; case 3: startStopSound(); if (chunk) { Mix_PlayChannel(-1, click, 0); } temp[i] = false; break; } } } }