Game not repeating

{
    int LevelDifficulty = 1;
    PlayGame(LevelDifficulty);

    while(true)
    {
        bool bLevelComplete = PlayGame(LevelDifficulty);
        std::cin.clear(); //clears any error
        std::cin.ignore(); //ignores the buffer

        
        if (bLevelComplete)
        {
            ++LevelDifficulty;

        }
        
    }

    return 0;
}```
My game isn't repeating after I enter the code....

Because you have PlayGame(LevelDifficulty); outside the loop.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms