Exemple #1
0
 public void DisplayResults(GameResult gameResult, SideOfCoin guess, SideOfCoin actual)
 {
     if (gameResult == GameResult.Won)
     {
         Message.WonGame(guess.ToString(), actual.ToString(), "and the result of the coin toss was also");
     }
     else
     {
         Message.LostGame(guess.ToString(), actual.ToString(), "but the result of the coin toss was");
     }
 }
Exemple #2
0
 public GameResult GetGameResult(SideOfCoin guess, SideOfCoin actual)
 {
     if (guess == actual)
     {
         return(GameResult.Won);
     }
     else
     {
         return(GameResult.Lost);
     }
 }
Exemple #3
0
 public CoinBuilder WithHeads()
 {
     sideOfCoin = SideOfCoin.Heads;
     return(this);
 }
Exemple #4
0
 public CoinBuilder WithTails()
 {
     sideOfCoin = SideOfCoin.Tails;
     return(this);
 }
Exemple #5
0
 public Coin(SideOfCoin side)
 {
     Side = side;
 }