public void ScissorsAlwaysTiesScissors() { IPlayer playerOne = new ScissorsPlayer(); IPlayer playerTwo = new ScissorsPlayer(); GameFlow game = new GameFlow(playerOne, playerTwo); Outcomes result = game.GetGameOutcome(); Assert.AreEqual(Outcomes.Draw, result); }
public void RockAlwaysTiesRock() { IPlayer playerOne = new RockPlayer(); IPlayer playerTwo = new RockPlayer(); GameFlow game = new GameFlow(playerOne, playerTwo); Outcomes result = game.GetGameOutcome(); Assert.AreEqual(Outcomes.Draw, result); }
public void RockAlwaysBeatsScissors() { IPlayer playerOne = new RockPlayer(); IPlayer playerTwo = new ScissorsPlayer(); GameFlow game = new GameFlow(playerOne, playerTwo); Outcomes result = game.GetGameOutcome(); Assert.AreEqual(Outcomes.PlayerOneWin, result); }
public void PaperAlwaysBeatsRock() { IPlayer playerOne = new RockPlayer(); IPlayer playerTwo = new PaperPlayer(); GameFlow game = new GameFlow(playerOne, playerTwo); Outcomes result = game.GetGameOutcome(); Assert.AreEqual(Outcomes.PlayerTwoWin, result); }
public void GetOutcome(GameFlow gameFlow) { Outcomes gameOutCome = gameFlow.GetGameOutcome(); if (gameOutCome == Outcomes.Draw) { Console.WriteLine("No one wins, you tied"); } else if (gameOutCome == Outcomes.PlayerOneWin) { Console.WriteLine("Player one wins"); } else { Console.WriteLine("Player two wins"); } }