Quick-and-dirty Haskell implementation of everyone's favorite falling blocks game.
Haskell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
COPYING
Main.hs
MainRenamed.hs
Makefile
README.markdown
Vera.ttf
mainc.c

README.markdown

lazy-tetrominoes

n.b. -- Lazy here refers to my coding habits, not the evaluation strategy.

It's a quick-and-dirty tetris clone, just what the world needed! Initial version was written in a few hours in order to prove a point in an IRC channel.

 * syntaxglitch should put together a simple game in Haskell this weekend, 
                just for the sake of doing something...
         <hpc>  there is no such thing as a simple game 
         <hpc>  something will rain on your parade; it is inevitable
<syntaxglitch>  only because I keep toying with ways to write less imperative code
<syntaxglitch>  I could write something stupidly simple like Tetris in a 
                couple hours in standard imperative style with a game loop and 
                some IORefs and whatnot, but where's the fun in that?
           * sm is with hpc.. it's true, there is no such thing as a simple 
                game (in haskell.. currently.. tty-style games excluded..)

As it turned out I spent more like 3-4 hours on it. On the other hand I didn't use any IORefs and it's actually mostly pure, albeit ugly, code. You win some, you lose some, but the point remains: Writing a stupidly simple game in Haskell isn't, in fact, all that difficult.

Writing a game that doesn't suck is left as an exercise for the reader.

/!\ /!\ Achtung! /!\ /!\

This really is pretty terrible code. Don't assume I endorse anything in particular here, and please don't hold any of it against me!

Other details

Since I'm too lazy to have written a .cabal file yet, here're the dependencies:

Good luck getting the first three working on non-Linux platforms!