Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data Values = Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King | Ace deriving (Show)
- data Suits = Spades | Hearts | Diamonds | Clubs
- type Cards = (Values, Suits)
- --greaterCard :: Cards -> Cards -> Bool
- convertValue :: Values -> Int
- convertValue Two = 2
- convertValue Three = 3
- convertValue Four = 4
- convertValue Five = 5
- convertValue Six = 6
- convertValue Seven = 7
- convertValue Eight = 8
- convertValue Nine = 9
- convertValue Ten = 10
- convertValue Jack = 11
- convertValue Queen = 12
- convertValue King = 13
- convertValue Ace = 14
- convertSuits :: Suits -> Int
- convertSuits Spades = 4
- convertSuits Hearts = 3
- convertSuits Diamonds = 2
- convertSuits Clubs = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement