twoRandomIntegers :: StdGen -> (Integer , Integer)
twoRandomIntegers g = (n1 , n2 )
where (n1 , g1 ) = randomR (0, 10) g
(n2 , g2 ) = randomR (0, 10) g1
shuffle' :: Integer -> Hand -> StdGen -> Hand
shuffle' indx Empty rnd = Empty
shuffle' indx (Add c h) rnd = Add( theCard (shuffle' newIndx newDeck gen) )
where (theCard, newDeck) = getCard indx (Add c h)
newIndx = randomR (0, sizeH hand)
shuffle' :: Integer -> Hand -> StdGen -> Hand
shuffle' indx Empty rnd = Empty
shuffle' indx (Add c h) rnd = Add( theCard (shuffle' newIndx newDeck gen) )
where
(theCard, newDeck) = getCard indx (Add c h)
newIndx = randomR (0, sizeH hand)
shuffle' :: Integer -> Hand -> StdGen -> Hand
shuffle' indx Empty rnd = Empty
shuffle' indx (Add c h) rnd = Add( theCard (shuffle' newIndx newDeck gen) )
where (theCard, newDeck) = getCard indx (Add c h)
newIndx = randomR (0, sizeH hand)