| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BishBosh.StateProperty.Seeker
Contents
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION- Permits discovery within a board.
Synopsis
- class Seeker seeker x y where
- findProximateKnights :: LogicalColour -> Coordinates x y -> seeker x y -> [Coordinates x y]
- findPieces :: (Piece -> Bool) -> seeker x y -> [LocatedPiece x y]
- findAllPieces :: Seeker seeker x y => seeker x y -> [LocatedPiece x y]
Type-classes
class Seeker seeker x y where Source #
An interface which may be implemented by data which can search the board.
Methods
Arguments
| :: LogicalColour | The logical colour of the |
| -> Coordinates x y | The destination to which the |
| -> seeker x y | |
| -> [Coordinates x y] |
Locate any Knights capable of taking a piece at the specified coordinates.
Arguments
| :: (Piece -> Bool) | Predicate. |
| -> seeker x y | |
| -> [LocatedPiece x y] |
Locate any pieces satisfying the specified predicate.
Instances
| (Enum x, Enum y, Ord x, Ord y) => Seeker MaybePieceByCoordinates x y Source # |
|
Defined in BishBosh.State.MaybePieceByCoordinates Methods findProximateKnights :: LogicalColour -> Coordinates x y -> MaybePieceByCoordinates x y -> [Coordinates x y] Source # findPieces :: (Piece -> Bool) -> MaybePieceByCoordinates x y -> [LocatedPiece x y] Source # | |
| (Enum x, Enum y, Ord x, Ord y) => Seeker CoordinatesByRankByLogicalColour x y Source # |
|
Defined in BishBosh.State.CoordinatesByRankByLogicalColour Methods findProximateKnights :: LogicalColour -> Coordinates x y -> CoordinatesByRankByLogicalColour x y -> [Coordinates x y] Source # findPieces :: (Piece -> Bool) -> CoordinatesByRankByLogicalColour x y -> [LocatedPiece x y] Source # | |
| (Enum x, Enum y, Ord x, Ord y) => Seeker Board x y Source # | |
Defined in BishBosh.State.Board Methods findProximateKnights :: LogicalColour -> Coordinates x y -> Board x y -> [Coordinates x y] Source # findPieces :: (Piece -> Bool) -> Board x y -> [LocatedPiece x y] Source # | |
Functions
findAllPieces :: Seeker seeker x y => seeker x y -> [LocatedPiece x y] Source #
Locate all pieces on the board.