From b395820522030d8dd258214227bb66aebb292629 Mon Sep 17 00:00:00 2001 From: adrienmalin <41926238+adrienmalin@users.noreply.github.com> Date: Thu, 7 Feb 2019 22:21:46 +0100 Subject: [PATCH] Create README.md --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..79d21e3 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Terminis +Another Tetris clone... again... but for terminal. Ideal for servers without GUI! + +## Usage +```bash + python terminis.py [level] +``` + level: integer between 1 and 15 + +## Dependency +* Python +* Python module Curses (native on linux) + +Can be installed on windows with: +```batch + pip install --users windows-curses +``` + +## Controls edit +Edit values of dictionary CONTROLS in the script: +```python +CONTROLS = { + "MOVE LEFT": "KEY_LEFT", + "MOVE RIGHT": "KEY_RIGHT", + "SOFT DROP": "KEY_DOWN", + "HARD DROP": " ", + "ROTATE COUNTER": "KEY_UP", + "ROTATE CLOCKWISE": "*", + "HOLD": "h", + "PAUSE": "p", + "QUIT": "q" +} +``` +Acceptable values are printable keys ('q', 'w'...) and curses's constants name starting with "KEY_" (see [Python documentation](https://docs.python.org/3/library/curses.html?highlight=curses#constants))