Exemplo 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!";
		}
Exemplo n.º 2
0
 public Game()
 {
     rules = new Rules();
 }
Exemplo n.º 3
0
 public static Moves[] DefeatedBy(this Moves move) =>
 Rules
 .Where(r => r.LosingMove == move)
 .Select(r => r.WinningMove)
 .ToArray();
Exemplo n.º 4
0
 public static bool Defeats(this Moves move, Moves otherMove) =>
 Rules.Exists(r => r.WinningMove == move && r.LosingMove == otherMove);