Copyright | (c) Michael Szvetits 2023 |
---|---|
License | BSD-3-Clause (see the file LICENSE) |
Maintainer | typedbyte@qualified.name |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Types and functions to represent and manipulate directions on a chess board.
Documentation
Represents a two-dimensional direction on a chess board.
Direction | |
|
Yields the integral vector pointing to the left, where the leftmost column is labelled A.
Yields the integral vector pointing to the right, where the leftmost column is labelled A.
Yields the integral vector pointing down, where the lowest row is labelled 1.
orthogonals :: [Direction] Source #
Yields the four integral vectors in the directions up, right, down and left.
diagonals :: [Direction] Source #
Yields the four integral vectors in the directions left up, right up, right down and left down.
principals :: [Direction] Source #
Yields the combination of orthogonal and diagonal integral vectors.