Similar: Haskell Random from Datatype
I have created a data type to contain the different weapons in the Rock Paper Scissor game.
data Weapon = Rock | Paper | Scissor
Now I would like to generate a random weapon which will be used by the computer against the user. I have take a look at the similar link I posted at the beginning but It seems too general for me.
I am able to generate random numbers from any other type. What I can get my head around is how to make my data type an instance of the Random class.