hs2048-0.1.0: A 2048 clone in Haskell.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Hs2048.Direction

Description

Types and functions for manipulating directions.

Synopsis

Documentation

data Direction Source

Represents a direction that the game board can be moved in. The cardinal directions are used to avoid collisions with Left and Right.

Constructors

West 
South 
East 
North 

directions :: [Direction] Source

Returns all of the directions.

>>> directions
[West,South,East,North]

render :: Direction -> String Source

Renders a direction as a string.

>>> render West
"\8592"