public bool didWin() { if (Codeword.Equals(word)) { return(true); } else { return(false); } }
// Method checks if the player won & prints a congrats message public bool DidWin() { // return true/false if (Codeword.Equals(CurrentWord)) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n Good job, you win!\nThe passcode was: {0}", Codeword); Console.ResetColor(); } //test only //Console.WriteLine(Codeword); //Console.WriteLine(CurrentWord); return(Codeword.Equals(CurrentWord)); }
public bool DidWin() { return(Codeword.Equals(CurrentWord)); }