Pig the dice game/Player: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 1,462: Line 1,462:
strat4 (pinfo:xs) | score pinfo > 75 = roll (pinfo:xs) >>= logic strat4 strat1
strat4 (pinfo:xs) | score pinfo > 75 = roll (pinfo:xs) >>= logic strat4 strat1
strat4 (pinfo:xs) = do
strat4 (pinfo:xs) = do
chance <- randomRIO (0, 4) :: IO Int
chance <- randomRIO (0, 3) :: IO Int
case chance of
case chance of
0 -> hold (pinfo:xs) >>= logic strat4 strat1
0 -> hold (pinfo:xs) >>= logic strat4 strat1