Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MoveRestriction
- data RuleOptions = RuleOptions {}
- possibleMoves :: RuleOptions -> HalmaBoard -> (Int, Int) -> [(Int, Int)]
- hasFinished :: HalmaBoard -> Team -> Bool
Documentation
data MoveRestriction Source #
Allowed | moves of this kind of field are allowed |
Temporarily | the player can pass the field but cannot occupy it |
Forbidden | the player can't pass or occupy the field |
Instances
Eq MoveRestriction Source # | |
Defined in Game.Halma.Rules (==) :: MoveRestriction -> MoveRestriction -> Bool # (/=) :: MoveRestriction -> MoveRestriction -> Bool # | |
Show MoveRestriction Source # | |
Defined in Game.Halma.Rules showsPrec :: Int -> MoveRestriction -> ShowS # show :: MoveRestriction -> String # showList :: [MoveRestriction] -> ShowS # | |
ToJSON MoveRestriction Source # | |
Defined in Game.Halma.Rules toJSON :: MoveRestriction -> Value # toEncoding :: MoveRestriction -> Encoding # toJSONList :: [MoveRestriction] -> Value # toEncodingList :: [MoveRestriction] -> Encoding # | |
FromJSON MoveRestriction Source # | |
Defined in Game.Halma.Rules parseJSON :: Value -> Parser MoveRestriction # parseJSONList :: Value -> Parser [MoveRestriction] # |
data RuleOptions Source #
RuleOptions | |
|
Instances
Eq RuleOptions Source # | |
Defined in Game.Halma.Rules (==) :: RuleOptions -> RuleOptions -> Bool # (/=) :: RuleOptions -> RuleOptions -> Bool # | |
Show RuleOptions Source # | |
Defined in Game.Halma.Rules showsPrec :: Int -> RuleOptions -> ShowS # show :: RuleOptions -> String # showList :: [RuleOptions] -> ShowS # | |
ToJSON RuleOptions Source # | |
Defined in Game.Halma.Rules toJSON :: RuleOptions -> Value # toEncoding :: RuleOptions -> Encoding # toJSONList :: [RuleOptions] -> Value # toEncodingList :: [RuleOptions] -> Encoding # | |
FromJSON RuleOptions Source # | |
Defined in Game.Halma.Rules parseJSON :: Value -> Parser RuleOptions # parseJSONList :: Value -> Parser [RuleOptions] # | |
Default RuleOptions Source # | |
Defined in Game.Halma.Rules def :: RuleOptions # |
possibleMoves :: RuleOptions -> HalmaBoard -> (Int, Int) -> [(Int, Int)] Source #
Computes all possible moves for a piece.
hasFinished :: HalmaBoard -> Team -> Bool Source #
Has a team all of it's pieces in the end zone?