spacemacs/layers/+fun/games
Arif Er 00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
..
img Use + instead of ! for layer categories 2015-09-11 00:13:51 -04:00
local/helm-games Deprecation of extensions and <pkg>-excluded-packages variables 2016-01-17 22:06:04 -05:00
README.org [applications] refactor key bindings to layer categories 2020-07-02 23:43:19 +02:00
config.el chore: update copyright headers to 2022 2022-06-03 17:32:20 +02:00
funcs.el chore: update copyright headers to 2022 2022-06-03 17:32:20 +02:00
packages.el Fix variable is void warnings at startup 2022-05-29 15:04:18 +02:00

README.org

Games layer

/TakeV/spacemacs/media/branch/develop/layers/+fun/games/img/games.png

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 binding Description
SPC a f 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

Sudoku

Key bindings Description
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

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. 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:

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 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.