public void TestGetRoshamboHuman() { HumanPlayer human = new HumanPlayer(); RoshamboV RoshamboValue = human.GetRoshambo("s"); Assert.AreEqual(RoshamboValue, RoshamboV.scissors); }
public void TestConvertInputToRoshambo() { HumanPlayer human = new HumanPlayer(); RoshamboV roshamboH = human.ConvertInputToRoshambo("s"); Assert.AreEqual(roshamboH, RoshamboV.scissors); }
public void TestGetRoshamboRock() { RockPlayer rock = new RockPlayer(); RoshamboV RoshamboRock = rock.GetRoshambo(); Assert.AreEqual(RoshamboRock, RoshamboV.rock); }
public void TestGetRoshamboRandom() { RandomPlayer random = new RandomPlayer(); RoshamboV RoshamboRandom = random.GetRoshambo(); Assert.IsInstanceOfType(RoshamboRandom, typeof(RoshamboV)); }
//public RoshamboApp(HumanPlayer hAvatar, RockPlayer rAvatar, RandomPlayer rrAvatar) //{ // HAvatar = hAvatar; // RAvatar = rAvatar; // RrAvatar = rrAvatar; //} #endregion public static string DecideFate(RoshamboV p1, RoshamboV p2) { string fate = null; if (p1 == p2) { fate = "draw"; } else if (p1 == RoshamboV.paper) { if (p2 == RoshamboV.rock) { fate = "player1"; } else if (p2 == RoshamboV.scissors) { fate = "player2"; } } else if (p1 == RoshamboV.scissors) { if (p2 == RoshamboV.rock) { fate = "player2"; } else if (p2 == RoshamboV.paper) { fate = "player1"; } } else if (p1 == RoshamboV.rock) { if (p2 == RoshamboV.scissors) { fate = "player1"; } else if (p2 == RoshamboV.paper) { fate = "player2"; } } return(fate); }
public Validator(RoshamboV roshamboValue) : base(roshamboValue) { }
public RandomPlayer(RoshamboV roshamboValue) : base(roshamboValue) { }
public RockPlayer(RoshamboV roshamboValue) : base(roshamboValue) { }
public HumanPlayer(RoshamboV roshamboValue) : base(roshamboValue) { }
public Player(RoshamboV RoshamboValue) { roshamboValue = RoshamboValue; }