summaryrefslogtreecommitdiff
path: root/Player.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Player.hs')
-rw-r--r--Player.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Player.hs b/Player.hs
index ec4d180..3bec60c 100644
--- a/Player.hs
+++ b/Player.hs
@@ -36,6 +36,11 @@ showCards (Player _ _ cs) prev att =
else Color.red $ join n c
join n c = (show n) ++ ". " ++ (C.showCard c)
+-- | Empty all players' cards.
+clearCards :: [Player] -> [Player]
+clearCards plyrs = map clear plyrs
+ where clear (Player n p _) = Player n p []
+
-- | Update penalty for each player after a round.
calcPenalties :: [Player] -> [Player]
calcPenalties plyrs = map penalize plyrs