spacemacs/layers/+fun/games/README.org
2016-04-05 22:28:54 -04:00

91 lines
2.9 KiB
Org Mode

#+TITLE: Games layer
[[file:img/games.png]]
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings-and-configuration][Key bindings and configuration]]
- [[#2048][2048]]
- [[#pacmacs][Pacmacs]]
- [[#tetris][Tetris]]
- [[#typit][Typit]]
* Description
This layer allows you to play evilified games in spacemacs.
The games available now are:
- 2048-game
- Pacmacs (Pacman for Emacs)
- Tetris
- Typit
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =games= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Key bindings and configuration
To run a game:
| Key Binding | Description |
|-------------+----------------------------------------|
| ~SPC a G~ | Open an =helm= buffer to select a game |
Possible helm actions:
- run (default)
- quit
- reset
** 2048
| Key Binding | Description |
|-------------+----------------------|
| ~h~ | Move the tiles left |
| ~j~ | Move the tiles down |
| ~k~ | Move the tiles up |
| ~l~ | Move the tiles right |
** Pacmacs
| Key Binding | Description |
|-------------+-------------|
| ~h~ | Move left |
| ~j~ | Move down |
| ~k~ | Move up |
| ~l~ | Move right |
| | |
** Tetris
| Key Binding | Description |
|-------------+--------------------------------|
| ~h~ | Move block to the left |
| ~i~ | Rotate block counter-clockwise |
| ~j~ | Move block to the bottom |
| ~k~ | Rotate block clockwise |
| ~l~ | Move block to the right |
| ~n~ | Start a new game |
| ~p~ | Pause the game |
| ~q~ | Quit the game |
** Typit
There is no specific key bindings for this game, just launch it and begin
typing.
The game can be customized with the following variables:
| Vsariable | Description |
|---------------------+-------------------------------------------------------|
| =typit-dict= | Language dictionary to use (default is =english.txt=) |
| =typit-dict-dir= | A directory path where to find dictionaries |
| =typit-line-length= | Length of generated lines (default 80) |
| =typit-test-time= | Duration of a game (default 60sec) |
Instrutions to create a new dictionary:
To add a new dictionary, you need to create a text file named your-language.txt
and put it under the dict directory. That file should contain 1000 most common
words from the language, a word per line. Please make sure that it uses
Unix-style (that is, LF) end-of-line sequence and the file ends with a newline.