Skip to content

martindemello/ocaml-tetris

Repository files navigation

Small tetris implementation using ocaml-allegro.

Author

Martin DeMello martindemello@gmail.com

Design

  • tetris.ml: Handle and update the game state
  • main.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

Install

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 *

Credits

Based heavily on the mltetris implementation by Oguz Berke DURAK

Background image from NASA Images

Contributing

Patches gladly accepted. Main TODO items:

  • Better fonts for the text elements
  • Instructions to compile under Windows
  • Other frontends

License

Licensed under the GPL (see LICENSE_GPL.txt)

About

Small tetris implementation using OCaml and Allegro

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published