diff options
Diffstat (limited to 'Player.hs')
-rw-r--r-- | Player.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,11 +25,11 @@ draw :: Player -> [Card] -> Player draw (Player n p cs) cs' = Player n p $ L.sort (cs' ++ cs) -- | Show player's cards, e.g. "1. Spade 2" -showCards :: Player -> Card -> String -showCards (Player _ _ cs) prev = +showCards :: Player -> Card -> Int -> String +showCards (Player _ _ cs) prev att = unlines $ zipWith joinAndColorize [1..] cs where joinAndColorize n c = - if C.isValid prev c + if C.isValid prev att c then if C.isSpecial c then Color.green $ join n c else join n c |