Martin DeMello martindemello@gmail.com
tetris.ml
: Handle and update the game statemain.ml
: Display the board and interact with the user
The game-state and game-interaction parts have been separated as much as possible; the goal is to be able to port to a different game engine or gui toolkit simply by replacing main.ml
Requires:
ocaml-batteries
ocaml-allegro
[download]- GNU
make
The makefile
assumes everything has been installed via findlib
(if you have installed ocaml and batteries via godi this should hold good).
A basic META file (META.ocaml-allegro
) is included to install ocaml-allegro (see the ocamlfind documentation). The following should work:
$ cp META.ocaml-allegro /path/to/ocaml-allegro/META
$ cd /path/to/ocaml-allegro/META
$ ocamlfind install allegro *
Based heavily on the mltetris implementation by Oguz Berke DURAK
Background image from NASA Images
Patches gladly accepted. Main TODO items:
- Better fonts for the text elements
- Instructions to compile under Windows
- Other frontends
Licensed under the GPL (see LICENSE_GPL.txt
)