Why does my while loop never end in my number guess game in C++? : <p>I am very new to programming and i am just messing around to try getting this guess a number game working, why once you guess the correct number or run of of lives does it continue?
Thanks!</p>

<pre><code> int rand_number{5};
        int guess_number{};
        int try_number{};
        int player_lifes{5};
        bool game_over{ false };


        cout &lt;&lt; "Enter a number between 1-10" &lt;&lt; endl;

        while (player_lifes &gt; 0 || game_over == true)
        {
            cout &lt;&lt; "You have " &lt;&lt; player_lifes &lt;&lt; ((player_lifes == 1)? " live left." : " lifes left.") &lt;&lt; endl;
            cout &lt;&lt; "Your guess is: ";
            cin &gt;&gt; guess_number;
            cout &lt;&lt; endl;


            if (guess_number == rand_number)
            {
                int final_lifes = (5 - player_lifes) + 1;
                cout &lt;&lt; "well done you solved it in " &lt;&lt; final_lifes &lt;&lt; (( final_lifes == 1)? " try." : " tries.") &lt;&lt; endl &lt;&lt; endl;
                game_over = true;

            }
            else
            {
                player_lifes--;
                cout &lt;&lt; "wrong try again" &lt;&lt; endl;
            }
        }

        cout &lt;&lt; "Finished";
</code></pre>
