Skip to content

Latest commit

 

History

History
113 lines (91 loc) · 3.42 KB

README.org

File metadata and controls

113 lines (91 loc) · 3.42 KB

Games layer

img/games.png

Table of Contents

Description

This layer allows you to play evilified games in spacemacs.

Features:

  • 2048-game
  • Pacmacs (Pacman for Emacs)
  • Sudoku
  • 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.

Games instructions

To run a game:

Key bindingDescription
SPC a GOpen an helm buffer to select a game

Possible helm actions:

  • run (default)
  • quit
  • reset

2048

Key bindingDescription
hMove the tiles left
jMove the tiles down
kMove the tiles up
lMove the tiles right

Pacmacs

Key bindingDescription
hMove left
jMove down
kMove up
lMove right

Sudoku

Key bindingsDescription
hMove left
jMove down
kMove up
lMove right
1 ... 9Insert value
0Remove value
NNew puzzle
, hHint
, sSave puzzle
, lLoad puzzle

Tetris

Key bindingDescription
hMove block to the left
iRotate block counter-clockwise
jMove block to the bottom
kRotate block clockwise
lMove block to the right
nStart a new game
pPause the game
qQuit the game

Typit

There is no specific key bindings for this game, just launch it and begin 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.

The game can be customized with the following variables:

VsariableDescription
typit-dictLanguage dictionary to use (default is english.txt)
typit-dict-dirA directory path where to find dictionaries
typit-line-lengthLength of generated lines (default 80)
typit-test-timeDuration of a game in seconds (default 60)

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.