betris-0.1.1.1: A horizontal version of tetris for braille users

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 # 
Instance details

Defined in Game.Tetris

Methods

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

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

Show Game Source # 
Instance details

Defined in Game.Tetris

Methods

showsPrec :: Int -> Game -> ShowS #

show :: Game -> String #

showList :: [Game] -> ShowS #

data Direction Source #

Constructors

Left 
Right 
Down 
Instances
Eq Direction Source # 
Instance details

Defined in Game.Tetris

Show Direction Source # 
Instance details

Defined in Game.Tetris

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