Learning to love debugging

I had some difficulty getting my Current Screen properly set after entering a valid level. As it turns out, I was accidentally defining a new LOCAL variable in my StartGame function.

INCORRECT:

 void StartGame()
     {
         Screen currentScreen = Screen.PassEntry;
         Terminal.WriteLine("You have selected level " + level);
         Terminal.WriteLine("Please enter password:");
     }

CORRECT:

     void StartGame()
     {
         currentScreen = Screen.PassEntry;
         Terminal.WriteLine("You have selected level " + level);
         Terminal.WriteLine("Please enter password:");
     }

Privacy & Terms