betris-0.1.0.0: Braille friendly vertical version of tetris

Copyright(c) 2017 Samuel Tay <sam.chong.tay@gmail.com>
LicenseBSD-style (see LICENSE)
MaintainerMario Lang <mlang@blind.guru>
Safe HaskellNone
LanguageHaskell2010

Game.Tetris

Description

A library implementation of Tetris.

This module has been taken from https://github.com/SamTay/tetris

Synopsis

Documentation

data Game Source #

Game state

Instances

Eq Game Source # 

Methods

(==) :: Game -> Game -> Bool #

(/=) :: Game -> Game -> Bool #

Show Game Source # 

Methods

showsPrec :: Int -> Game -> ShowS #

show :: Game -> String #

showList :: [Game] -> ShowS #

boardWidth :: Int Source #

Visible, active board size

boardHeight :: Int Source #

Visible, active board size

initGame :: Int -> IO Game Source #

Initialize a game with a given level

rotate :: Game -> Game Source #

Handle counterclockwise block rotation (if possible) Allows wallkicks: http://tetris.wikia.com/wiki/TGM_rotation

shift :: Direction -> Game -> Game Source #

Try to shift current block; if shifting not possible, leave block where it is

shape :: Lens' Block Tetrimino Source #

coords :: Block -> [Coord] Source #

Get coordinates of entire block