Question: NOTE: All functions should be implemented in Haskell! Question 2: Rock-Paper-Scissors (20 points) In the game rock-paper-scissors, each player picks one of the three options.
NOTE: All functions should be implemented in Haskell!



Question 2: Rock-Paper-Scissors (20 points) In the game rock-paper-scissors, each player picks one of the three options. If one player chooses rock and the other paper, paper will win. If one chooses paper and the other scissors, scissors will win. If one chooses scissors, and the other rock, then rock will win. If both players pick the same option, it is a tie. 2.1 Create a data type that can be used for this game. [4 points] 22 Using the type from part (2.1), write the type description for a function, rps, that will take two players' moves and return either 1 if player 1 wins, 2 if player 2 wins, or 0 if it's a tie. [4 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
