2 hours on learning this part

I’ve recently felt weird about what I’ve learned about the Enums, like what Coach Ben says.
When Ben asks us (where it’s me) to solve how to make password for each difficulty level, I had difficulty in solving it without knowing what enum is for, as I give up in that part…later then when I continue to play the video, then I realized what enum is for…it makes your code easier, as it motivates me to create more menu other than password.

Ben taught us how to create this enum:
enumScreen { MainMenu, Password, Win };

When I get into enum, I’m interest on trying to create a new enumScreen… so if you successfully crack a password, you still must crack a SecretCode (as a bonus)
enumScreen { MainMenu, Password, Win, SecretCode };

But I fail on this attempt… Maybe there’s other who like to help this out as a Challenge? Thankyou and stay Curious Programmers!! :smiley:

and here’s my code:

Hope someone can help my Self Challenge, Thankyou and Stay Healthy :slight_smile:

I’m just learning myself, but it looks like when you call RunSecret you are writing the message and then checking input immediately. You need to write the message, and teach the OnUserInput function what to do when someone enters the secret code, and then check the secet code against the input.
Also, I don’t think you are setting the secretCode variable, its initialized but not set.
Hope this helps!

Hope u have my code revised bro :rofl: :rofl:… by the way thankyou for your advise :slight_smile:

hey @ChrisFlash , here’s how I made a Hacker game where he must Crack a Password encrypted with a Secret Code… as a thanks for you to help, here I send you the real code :slight_smile: :

The challenge that Myself face is with the OnUserInput function where Enum and initiating the OnUserInput is my biggest challenge of all in this part of the course…Ben Tristem is right like what he says in the video that for most begineers like myself is weird and uncomforting when using the enum for the first time, but if we could face the challenge seriously and try to do some self challenge like what I do here, you could get use with Enum faster… Hope it helps :crazy_face: :upside_down_face: :nerd_face: :nerd_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face:

Privacy & Terms