lewisjb / tetran

Tetris-style game written in FORTRAN-95

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image

Tetran

author

Lewis Bobbermen, Michael Hirsch Ph.D.

Basic tetris-style game written in Modern Fortran.

  • Currently only one level, play until pieces overflow
  • Fortran 2008 syntax
  • play details given at game over and logged to tetran.log
  • Ncurses used for display, called directly from Fortran code.

Tetran Prereq

Tetran works on Mac, Linux, Cygwin and Windows Subsystem for Linux.

Linux / WSL

sudo apt install gfortran libncurses-dev

Mac

brew install gcc ncurses

Cygwin

setup-x86_64.exe -P libncurses-devel cmake make gcc-gfortran

Compile Tetran

cd bin
cmake ..
make

You can optionally specify a compiler by setting FC=. For example, to use the Intel Fortran compiler:

FC=ifort cmake ..
make

Play

./tetran

The difficulty level may be set (rate of falling blocks higher) by:

./tetran 10

The first number sets the difficulty level (higher number more difficult; positive integers only. This integer number is used to divide the wait time period by

Controls

Key Effect
W Rotate piece
A/D Left and right respectively
S Move down faster
Q Exit the game

References

Standard Tetris Specifications

About

Tetris-style game written in FORTRAN-95

License:GNU Affero General Public License v3.0


Languages

Language:Fortran 95.1%Language:CMake 3.1%Language:Python 1.0%Language:Makefile 0.8%