Ejemplo n.º 1
0
        public GameResult GetTheWinner(Choices p1Choice, Choices p2Choice)
        {
            if (p1Choice.Equals(p2Choice))
            {
                return(GameResult.Tie);
            }

            if (p1Choice.Equals(Choices.Rock) && p2Choice.Equals(Choices.Paper) ||
                p1Choice.Equals(Choices.Paper) && p2Choice.Equals(Choices.Scissor) ||
                p1Choice.Equals(Choices.Scissor) && p2Choice.Equals(Choices.Rock))
            {
                return(GameResult.Player2_Wins);
            }

            return(GameResult.Player1_Wins);
        }