int main(int argc, const char * argv[]) { int counter = 1; while (counter < 3) { int goAgain = 0; int numberOfItems = 0; printIntro(); getRoomChoice(); if (counter == 1) { printf("\nDo you want to try again? Type 0 for NO and 1 for YES."); } else { break; } numberOfItems =scanf("%d", &goAgain); if (goAgain == 1) { counter++; } else { break; } } return 0; }
void Preferences::setCurrentRoomChoice(int currentRoomChoice) { m_currentRoomChoice = getRoomChoice(currentRoomChoice); m_settings->setValue("CurrentRoomChoice", m_currentRoomChoice); }