Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. public Outcome CheckGuess()
  2.         {
  3.             if (CanMakeGuess)
  4.             {
  5.                 if (_guessedNumbers.ContainsKey(Guess))
  6.                 {
  7.                     return Outcome.OldGuess;
  8.                 }
  9.                 if (Count == 7)
  10.                 {
  11.                     return Outcome.NoMoreGuesses;
  12.                 }
  13.                 if (_guess == Number)
  14.                 {
  15.                     return Outcome.Right;
  16.                 }
  17.  
  18.                 else if (_guess > Number)
  19.                 {
  20.                     return Outcome.High;
  21.                 }
  22.                 else if (_guess < Number)
  23.                 {
  24.                     return Outcome.Low;
  25.                 }
  26.             }
  27.             return Outcome.NoMoreGuesses;
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement