So Here It Is

Hey everyone-

I just finished Terminal Hacker, which is pretty exciting for me because it’s the largest and most functional code learning project that I’ve ever finished! These courses make it so easy to move from one “hand-hold” to the next. Really feel like the concepts are sticking in my head like they never have previously. Any feedback would be appreciated, you can find the game here. Thanks much!

3 Likes

Hey Chris,

Congratulations on completing this section of the course and publishing your game - no small achievement so well done :slight_smile:

Regarding feedback - I noted that your passwords are case-sensitive, e.g. if the hint was “dnayc” entering “CANDY” isn’t counted as correct.

You could of course leave it as such, although you may want to include a note somewhere that states about the password case-sensitivity. If you wanted to support any case that the player enters you can use string methods like ToUpper() and ToLower(), you’d do this on both the player’s input and also the anagram, not for display, just in the evaluation.

Example;

public void Example()
{
    string password = "candy";
    string input = "CaNdY";      // allow for crazy player

    if(password.ToUpper() == input.ToUpper())
    {
        // case-insensitive password match
    }
}

Hope the above is of use and well done again :slight_smile:

1 Like

Thank you Rob-

I appreciate the hint, as I did try to implement a solution to make"menu" not case sensitive (I myself have an odd habit of just capitalizing things at random when I type), but my solution was to use “or” (double pipe) statements. This worked for that very limited instance, but I thought it too cumbersome to use for the passwords. I will definitely implement this in my code.

Thanks for playing and thanks for the feedback!

Chris

1 Like

Hey Chris,

Aha, well done on the “MENU”, I didn’t test/try that one. Using the OR can be a bit cumbersome, even with a short word like “menu” you have lots of different possibilites;

MENU
mENU
meNU
menU
menu
MEnu
MENu
… etc

that’s a lot of ORs… easier to uppercase or lowercase both parts of the comparison - where you want to of course. You might want to restrict users to enter in a specific case, that’s cool too - as long as they know :slight_smile:

Thanks for playing and thanks for the feedback!

Very welcome and I hope you enjoy the rest of the course :slight_smile:

Privacy & Terms