hs2048-0.1.0: A 2048 clone in Haskell.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Hs2048.Point

Description

Types and functions for manipulating points.

Synopsis

Documentation

type Point = (Int, Int) Source

Represents a point on a game board. The top-left corner is (0, 0) with x increasing left-to-right and y increasing top-to-bottom.

x :: Point -> Int Source

Returns the x part of a point.

>>> x (1, 2)
1

y :: Point -> Int Source

Returns the y part of a point.

>>> y (1, 2)
2