I had the right idea but wrong place

In this lectures challenge I am pleased I managed to get the correct statement to show the password screen variable.

currentScreen = Screen.Password;

Instead of putting it under void StartGame() I put it under…

       else if (input == "1")
        {
            level = 1;
            StartGame();
            currentScreen = Screen.Password;
        }
        else if (input == "2")
        {
            level = 2;
            StartGame();
            currentScreen = Screen.Password;
        }

It’s good to see that it goes under one method as it reduced the amount of code being used

1 Like

Privacy & Terms