Esempio n. 1
0
 // If clue not found, generate hint instead
 public string GenerateHint(Guess guess, int guessCount)
 {
     if (guessCount % 2 == 0)
     {
         return(guess.getX() > clue.getX() ? "^" : "v");
     }
     else
     {
         return(guess.getY() > clue.getY() ? "<" : ">");
     }
 }
Esempio n. 2
0
 // Is the user guess == to clue
 private bool isMatch(Guess guess, Clue key)
 {
     return((guess.getX() == key.getX() && guess.getY() == key.getY()) ? true : false);
 }