factor/apps/tetris
nomennescio 76e6ede2ec Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
..
test Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
README.txt Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
load.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris-board.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris-colours.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris-gadget.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris-gl.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris-piece.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetris.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00
tetromino.factor Imported https://downloads.factorcode.org/releases/0.87/Factor-0.87.tar.gz 2019-10-18 15:05:04 +02:00

README.txt

This is a simple tetris game. To play, open factor (in GUI mode), and run:

"contrib/tetris" run-module

This should open a new window with a running tetris game. The commands are:

left, right arrows: move the current piece left or right
up arrow:           rotate the piece clockwise
down arrow:         lower the piece one row
space bar:          drop the piece
p:                  pause/unpause
n:                  start a new game
q:                  quit (currently just stops updating, see TODO)

Running tetris-window will leave a tetris-gadget on your stack. To get your
current score you can do:

tetris-gadget-tetris tetris-score

TODO:
- close the window on quit
- rotation of pieces when they're on the far right of the board
- show the score and level, maybe floating about the screen somewhere
- make blocks prettier