Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.Halma.Rules
Synopsis
- data MoveRestriction
- data RuleOptions = RuleOptions {}
- possibleMoves :: RuleOptions -> HalmaBoard -> (Int, Int) -> [(Int, Int)]
- hasFinished :: HalmaBoard -> Team -> Bool
Documentation
data MoveRestriction Source #
Constructors
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 Methods (==) :: MoveRestriction -> MoveRestriction -> Bool # (/=) :: MoveRestriction -> MoveRestriction -> Bool # | |
Show MoveRestriction Source # | |
Defined in Game.Halma.Rules Methods showsPrec :: Int -> MoveRestriction -> ShowS # show :: MoveRestriction -> String # showList :: [MoveRestriction] -> ShowS # | |
ToJSON MoveRestriction Source # | |
Defined in Game.Halma.Rules Methods toJSON :: MoveRestriction -> Value # toEncoding :: MoveRestriction -> Encoding # toJSONList :: [MoveRestriction] -> Value # toEncodingList :: [MoveRestriction] -> Encoding # | |
FromJSON MoveRestriction Source # | |
Defined in Game.Halma.Rules Methods parseJSON :: Value -> Parser MoveRestriction # parseJSONList :: Value -> Parser [MoveRestriction] # |
data RuleOptions Source #
Constructors
RuleOptions | |
Fields
|
Instances
Eq RuleOptions Source # | |
Defined in Game.Halma.Rules | |
Show RuleOptions Source # | |
Defined in Game.Halma.Rules Methods showsPrec :: Int -> RuleOptions -> ShowS # show :: RuleOptions -> String # showList :: [RuleOptions] -> ShowS # | |
ToJSON RuleOptions Source # | |
Defined in Game.Halma.Rules Methods toJSON :: RuleOptions -> Value # toEncoding :: RuleOptions -> Encoding # toJSONList :: [RuleOptions] -> Value # toEncodingList :: [RuleOptions] -> Encoding # | |
FromJSON RuleOptions Source # | |
Defined in Game.Halma.Rules | |
Default RuleOptions Source # | |
Defined in Game.Halma.Rules Methods 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?