I’ll start off by saying my attempt wasn’t very far off from Ben’s.
Initially, I was stumped for around 5 minutes. I was trying to find a place to start but wasn’t sure where. I then jumped into Void OnUserInput(String input)
as this is where we’d find the user typing their password. I then decided I need a global variable to be shared here that would change based on the level. This is where things started to differ from Ben.
I created a new function void GetPassword()
which checked what level was selected and set the password.
A second function was created which was identical to the void CheckPassword(string input)
and contained the means to respond to the current guess via the IF Statement if (input == password)
.
Overall, I thought that this challenge was a great way to really recall what I had practised prior to this challenge and nail down how to use it effectively.
Did anyone else have a similar result to Ben on their first attempt or did you come up with something completely different?