2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Games layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
[[file:img/games.png]]
|
|
|
|
|
2018-09-19 03:54:47 +00:00
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2017-10-04 20:45:43 +00:00
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#games-instructions][Games instructions]]
|
|
|
|
- [[#2048][2048]]
|
|
|
|
- [[#pacmacs][Pacmacs]]
|
|
|
|
- [[#sudoku][Sudoku]]
|
|
|
|
- [[#tetris][Tetris]]
|
|
|
|
- [[#typit][Typit]]
|
|
|
|
- [[#create-a-new-dictionary][Create a new dictionary]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Description
|
|
|
|
This layer allows you to play evilified games in spacemacs.
|
|
|
|
|
2017-10-04 20:45:43 +00:00
|
|
|
** Features:
|
2018-09-19 03:54:47 +00:00
|
|
|
- 2048-game
|
|
|
|
- Pacmacs (Pacman for Emacs)
|
|
|
|
- Sudoku
|
|
|
|
- Tetris
|
|
|
|
- Typit
|
2016-04-13 03:31:38 +00:00
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
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.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2016-04-06 02:41:36 +00:00
|
|
|
* Games instructions
|
2015-06-10 16:44:30 +00:00
|
|
|
To run a game:
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|-------------+----------------------------------------|
|
|
|
|
| ~SPC a G~ | Open an =helm= buffer to select a game |
|
|
|
|
|
|
|
|
Possible helm actions:
|
|
|
|
- run (default)
|
|
|
|
- quit
|
|
|
|
- reset
|
2016-04-13 03:31:38 +00:00
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
** 2048
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|-------------+----------------------|
|
|
|
|
| ~h~ | Move the tiles left |
|
|
|
|
| ~j~ | Move the tiles down |
|
|
|
|
| ~k~ | Move the tiles up |
|
|
|
|
| ~l~ | Move the tiles right |
|
|
|
|
|
2015-10-13 17:54:12 +00:00
|
|
|
** Pacmacs
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-10-30 11:20:58 +00:00
|
|
|
|-------------+-------------|
|
|
|
|
| ~h~ | Move left |
|
|
|
|
| ~j~ | Move down |
|
|
|
|
| ~k~ | Move up |
|
|
|
|
| ~l~ | Move right |
|
|
|
|
| | |
|
2016-04-06 02:28:16 +00:00
|
|
|
|
2016-11-14 01:37:12 +00:00
|
|
|
** Sudoku
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key bindings | Description |
|
2016-11-14 01:37:12 +00:00
|
|
|
| ~h~ | Move left |
|
|
|
|
| ~j~ | Move down |
|
|
|
|
| ~k~ | Move up |
|
|
|
|
| ~l~ | Move right |
|
|
|
|
| ~1 ... 9~ | Insert value |
|
|
|
|
| ~0~ | Remove value |
|
|
|
|
| ~N~ | New puzzle |
|
|
|
|
| ~, h~ | Hint |
|
|
|
|
| ~, s~ | Save puzzle |
|
|
|
|
| ~, l~ | Load puzzle |
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
** Tetris
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|-------------+--------------------------------|
|
|
|
|
| ~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 |
|
2016-04-06 02:28:16 +00:00
|
|
|
|
|
|
|
** Typit
|
|
|
|
There is no specific key bindings for this game, just launch it and begin
|
2016-04-06 02:41:36 +00:00
|
|
|
typing. Use ~C-g~ to exit the game at any time.
|
|
|
|
|
|
|
|
There are two difficulties:
|
|
|
|
- beginner: use 200 most common words
|
|
|
|
- expert: use 1000 most common words
|
|
|
|
|
|
|
|
By default a game duration is one minute.
|
2016-04-06 02:28:16 +00:00
|
|
|
|
|
|
|
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) |
|
2016-04-06 02:41:36 +00:00
|
|
|
| =typit-test-time= | Duration of a game in seconds (default 60) |
|
2016-04-06 02:28:16 +00:00
|
|
|
|
2016-04-06 02:41:36 +00:00
|
|
|
*** Create a new dictionary
|
2016-04-06 02:28:16 +00:00
|
|
|
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.
|