Esempio n. 1
0
		private string DisplayLoss(Choice choiceOne, Choice choiceTwo)
		{
			string output;
			Rules rule = new Rules(choiceTwo, choiceOne);
			output = rule.DisplayWinner();
			return output + "\nPlayer 2 wins!";
		}
Esempio n. 2
0
 public Game()
 {
     rules = new Rules();
 }
Esempio n. 3
0
 public static Moves[] DefeatedBy(this Moves move) =>
 Rules
 .Where(r => r.LosingMove == move)
 .Select(r => r.WinningMove)
 .ToArray();
Esempio n. 4
0
 public static bool Defeats(this Moves move, Moves otherMove) =>
 Rules.Exists(r => r.WinningMove == move && r.LosingMove == otherMove);