solve-1.0: Solving simple games

LicenseMIT
MaintainerJoe Leslie-Hurd <joe@gilith.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Solve.FoxHounds

Description

 

Documentation

data Coord Source #

Constructors

Coord Int Int 
Instances
Eq Coord Source # 
Instance details

Defined in Solve.FoxHounds

Methods

(==) :: Coord -> Coord -> Bool #

(/=) :: Coord -> Coord -> Bool #

Ord Coord Source # 
Instance details

Defined in Solve.FoxHounds

Methods

compare :: Coord -> Coord -> Ordering #

(<) :: Coord -> Coord -> Bool #

(<=) :: Coord -> Coord -> Bool #

(>) :: Coord -> Coord -> Bool #

(>=) :: Coord -> Coord -> Bool #

max :: Coord -> Coord -> Coord #

min :: Coord -> Coord -> Coord #

Show Coord Source # 
Instance details

Defined in Solve.FoxHounds

Methods

showsPrec :: Int -> Coord -> ShowS #

show :: Coord -> String #

showList :: [Coord] -> ShowS #

data Pos Source #

Constructors

Pos 

Fields

Instances
Eq Pos Source # 
Instance details

Defined in Solve.FoxHounds

Methods

(==) :: Pos -> Pos -> Bool #

(/=) :: Pos -> Pos -> Bool #

Ord Pos Source # 
Instance details

Defined in Solve.FoxHounds

Methods

compare :: Pos -> Pos -> Ordering #

(<) :: Pos -> Pos -> Bool #

(<=) :: Pos -> Pos -> Bool #

(>) :: Pos -> Pos -> Bool #

(>=) :: Pos -> Pos -> Bool #

max :: Pos -> Pos -> Pos #

min :: Pos -> Pos -> Pos #

Show Pos Source # 
Instance details

Defined in Solve.FoxHounds

Methods

showsPrec :: Int -> Pos -> ShowS #

show :: Pos -> String #

showList :: [Pos] -> ShowS #

move :: Pos -> [Pos] Source #

data Eval Source #

Constructors

FoxEscape Int 
FoxCapture Int 
Instances
Eq Eval Source # 
Instance details

Defined in Solve.FoxHounds

Methods

(==) :: Eval -> Eval -> Bool #

(/=) :: Eval -> Eval -> Bool #

Ord Eval Source # 
Instance details

Defined in Solve.FoxHounds

Methods

compare :: Eval -> Eval -> Ordering #

(<) :: Eval -> Eval -> Bool #

(<=) :: Eval -> Eval -> Bool #

(>) :: Eval -> Eval -> Bool #

(>=) :: Eval -> Eval -> Bool #

max :: Eval -> Eval -> Eval #

min :: Eval -> Eval -> Eval #

Show Eval Source # 
Instance details

Defined in Solve.FoxHounds

Methods

showsPrec :: Int -> Eval -> ShowS #

show :: Eval -> String #

showList :: [Eval] -> ShowS #

eval :: Pos -> Either Eval ([Eval] -> Bool -> Eval) Source #