blob: eab245e71f8b61d9ed3540df726c2e137db8f447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
;;; games-config.el --- emacs games -*- lexical-binding: t; -*-
;;; Commentary:
;; The games menu is the easiest entry. "Shift-Alt-G" will get you there. Enjoy!
;;
;;; Code:
;; --------------------------------- Games Menu --------------------------------
(defhydra hydra-games (:color blue :hint nil)
"\n"
("2" 2048-game "2048 : Combine the Numbered Tiles to get to 2048" :column "Game")
("c" chess "Chess : Play the 64 Squares and Checkmate the King" :column "Game")
("d" dunnet "Dunnet : Emacs' Built-n Text Adventure" :column "Game")
("g" gomoku "Gomoku : Tic Tac Toe, but Five in a Row" :column "Game")
("m" malyon "Malyon : The Text Adventure Player" :column "Game")
("t" tetris "Tetris : Combine falling blocks and score" :column "Game"))
(global-set-key (kbd "M-G") 'hydra-games/body)
;; ----------------------------------- Malyon ----------------------------------
;; text based adventure player
(use-package malyon
:defer 1
:config
(setq malyon-stories-directory (concat sync-dir "text.games/"))
;; ------------------------------------ 2048 -----------------------------------
;; combine numbered tiles to create the elusive number 2048.
(use-package 2048-game
:defer 1)
;; ----------------------------------- Chess -----------------------------------
;; play the 64 squares and checkmate the opponent's king
(use-package chess
:defer 1
:config
(setq chess-default-display 'chess-images)
(setq chess-images-directory
(concat user-emacs-directory "assets/chess/pieces/xboard/"))
(setq chess-images-dark-color "#779556")
(setq chess-images-light-color "#EBECD0")
(setq chess-images-default-size 100)
(setq chess-full-name user-whole-name)
(setq chess-default-engine 'chess-fruit))
;; Notes from source code
;; If you'd like to view or edit Portable Game Notation (PGN) files,
;; `chess-pgn-mode' provides a text-mode derived mode which can display the
;; chess position at point.
;; To improve your chess ability, `M-x chess-tutorial' provides a simple knight
;; movement exercise to get you started, and `M-x chess-puzzle' can be used
;; to solve puzzle collections in EPD or PGN format.
;; The variable `chess-default-display' controls which display modules
;; are tried when a chessboard should be displayed. By default, chess-images
;; is tried first. If Emacs is not running in a graphical environment,
;; chess-ics1 is used instead. To enable the chess-plain display module,
;; customize `chess-default-display' accordingly.
;; Once this is working, the next thing to do is to customize
;; `chess-default-modules'. This is a list of functionality modules used
;; by chess.el to provide additional functionality. You can enable or
;; disable modules so that Emacs Chess better suites your tastes.
;; Those modules in turn often have configuration variables, and
(provide 'games-config)
;;; games-config.el ends here.
|