haverer-0.2.0.0: Implementation of the rules of Love Letter

Safe HaskellNone
LanguageHaskell2010

Haverer.Player

Synopsis

Documentation

data Error a Source

Instances

Eq a => Eq (Error a) Source 
Show a => Show (Error a) Source 

data PlayerSet a Source

Instances

Eq a => Eq (PlayerSet a) Source 
Show a => Show (PlayerSet a) Source 

playCard :: Player -> Card -> Card -> Maybe Player Source

Given a dealt and chosen card, update the hand to chosen, and chuck whatever wasn't played onto the discard pile.

toPlayerSet :: Ord a => [a] -> Either (Error a) (PlayerSet a) Source