Copyright | (c) Henry J. Wylde, 2015 |
---|---|
License | BSD3 |
Maintainer | public@hjwylde.com |
Safe Haskell | None |
Language | Haskell2010 |
Game.Werewolf.Player
Description
Player data structures.
- data Player = Player {}
- name :: Lens' Player Text
- role :: Lens' Player Role
- state :: Lens' Player State
- newPlayer :: Text -> Role -> Player
- findByName :: Text -> [Player] -> Maybe Player
- findByName_ :: Text -> [Player] -> Player
- filterScapegoats :: [Player] -> [Player]
- filterSeers :: [Player] -> [Player]
- filterVillagers :: [Player] -> [Player]
- filterWerewolves :: [Player] -> [Player]
- doesPlayerExist :: Text -> [Player] -> Bool
- isScapegoat :: Player -> Bool
- isSeer :: Player -> Bool
- isVillager :: Player -> Bool
- isWerewolf :: Player -> Bool
- isAlive :: Player -> Bool
- isDead :: Player -> Bool
- data State
- filterAlive :: [Player] -> [Player]
- filterDead :: [Player] -> [Player]
Player
Searches
findByName_ :: Text -> [Player] -> Player Source
Filters
filterScapegoats :: [Player] -> [Player] Source
filterSeers :: [Player] -> [Player] Source
filterVillagers :: [Player] -> [Player] Source
filterWerewolves :: [Player] -> [Player] Source
Queries
doesPlayerExist :: Text -> [Player] -> Bool Source
isScapegoat :: Player -> Bool Source
isVillager :: Player -> Bool Source
isWerewolf :: Player -> Bool Source
State
Filters
filterAlive :: [Player] -> [Player] Source
filterDead :: [Player] -> [Player] Source