| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Direction
Description
Handling of arrows and WASD in WorldView. Module is meant to be used
qualified.
Synopsis
- newtype Coord = Coord (Nat, Nat)
- topLeftOf :: Coord -> Coord -> Bool
- (+) :: Coord -> Coord -> Coord
- unCoord :: Coord -> (Nat, Nat)
- mapCoord :: (Nat -> Nat) -> Coord -> Coord
- (-) :: Coord -> Coord -> Coord
- data T
- all :: [T]
- move :: T -> Coord -> Maybe Coord
- ofArrows :: Arrows -> Maybe T
- isAdjacent :: Coord -> Coord -> Bool
Documentation
move :: T -> Coord -> Maybe Coord #
Shifts a coordinate by a direction, returning the new coordinate
isAdjacent :: Coord -> Coord -> Bool #
Whether c1 and c2 are adjacent.