M-x list-packages
in Emacs and searching for
klondike
, if you have the Melpa repository loaded by Package
. If you
don’t have the repository added – yet –, you can find instructions for
how to add it at the Melpa
Github page.
You can launch a game by running M-x klondike
; if a game is already
running, its buffer will be brought to the forefront.
To select any of the bottom 7 rows, press any key 1
through 7
.
To select any of the top-right stacks, press !
, @
, #
, or $
(from left, to right).
To select any face-up cards moved from the face-down stack (in the
top-left corner of the screen), press 0
.
If multiple cards are available to move, the visible portion of the
stack will be numbered so that you can specify the depth of the stack
you want to move:
You can select a particular number using the function keys; using
F2
, we should get:
This will move the 4 of spades and any cards which reside on top of it. If there is only one card face-up on any stack, that card will be selected automatically.
To move the card(s) you’ve selected, use the same key-bindings
which’re used to pick a stack to select cards from (except for 0
;
you cannot move cards to this area other than from the face-down
stack).
There are three shortcuts, given their frequency of use: in lieu of using the function keys
- selecting one of the bottom-row stacks (keys
1
through7
) will attempt to move all visible cards of your picked stack to the new stack you’ve selected - selecting one of the top-right stacks (keys
!
,@
,#
, and$
, from left, to right) will attempt to move the top-most visible card of your picked stack to the top-right stack you’ve selected TAB
will check if any of the top-right stacks are able to accept the top-most visible card of your picked stack; if you can move this top-most visible card to any of them, it will get moved automatically, for you
Finally, – to flip a card from the face-down stack to face-up – use
SPC
.
- klondike-mode (the initial mode you enter upon any Klondike game)
- klondike-picker-mode (the mode the game uses when picking a card depth from the visible cards of a particular stack)
- klondike-select-mode (the mode the game uses when you are selecting a stack to move your picked cards to)
Their bindings are laid out, below, for each mode; to redefine any
key-binding, use define-key
and the mode-map of the respective mode
and the function/~lambda~ specified by the tables, below.
Key | Function |
---|---|
SPC | #'klondike-card-deck-next |
0 | (lambda () (interactive) (klondike--stack-pick-or-select 'faceup)) |
! | (lambda () (interactive) (klondike--stack-pick-or-select 'empty 0)) |
@ | (lambda () (interactive) (klondike--stack-pick-or-select 'empty 1)) |
# | (lambda () (interactive) (klondike--stack-pick-or-select 'empty 2)) |
$ | (lambda () (interactive) (klondike--stack-pick-or-select 'empty 3)) |
1 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 0)) |
2 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 1)) |
3 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 2)) |
4 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 3)) |
5 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 4)) |
6 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 5)) |
7 | (lambda () (interactive) (klondike--stack-pick-or-select 'pile 6)) |
C-/ | #'klondike-history-prev |
C-_ | #'klondike-history-prev |
<undo> | #'klondike-history-prev |
C-x u | #'klondike-history-prev |
q | #'quit-window |
Q | #'klondike-quit-game |
Key | Function |
---|---|
TAB | #'klondike-stack-find-available-empty |
F1 | (lambda () (interactive) (klondike--stack-pick 1)) |
F2 | (lambda () (interactive) (klondike--stack-pick 2)) |
F3 | (lambda () (interactive) (klondike--stack-pick 3)) |
F4 | (lambda () (interactive) (klondike--stack-pick 4)) |
F5 | (lambda () (interactive) (klondike--stack-pick 5)) |
F6 | (lambda () (interactive) (klondike--stack-pick 6)) |
F7 | (lambda () (interactive) (klondike--stack-pick 7)) |
F8 | (lambda () (interactive) (klondike--stack-pick 8)) |
F9 | (lambda () (interactive) (klondike--stack-pick 9)) |
F10 | (lambda () (interactive) (klondike--stack-pick 10)) |
F11 | (lambda () (interactive) (klondike--stack-pick 11)) |
F12 | (lambda () (interactive) (klondike--stack-pick 12)) |
C-g | #'klondike-stack-pick-or-select-quit |
Key | Function |
---|---|
TAB | #'klondike-stack-find-available-empty |
! | (lambda () (interactive) (klondike--stack-select 'empty 0)) |
@ | (lambda () (interactive) (klondike--stack-select 'empty 1)) |
# | (lambda () (interactive) (klondike--stack-select 'empty 2)) |
$ | (lambda () (interactive) (klondike--stack-select 'empty 3)) |
1 | (lambda () (interactive) (klondike--stack-select 'pile 0)) |
2 | (lambda () (interactive) (klondike--stack-select 'pile 1)) |
3 | (lambda () (interactive) (klondike--stack-select 'pile 2)) |
4 | (lambda () (interactive) (klondike--stack-select 'pile 3)) |
5 | (lambda () (interactive) (klondike--stack-select 'pile 4)) |
6 | (lambda () (interactive) (klondike--stack-select 'pile 5)) |
7 | (lambda () (interactive) (klondike--stack-select 'pile 6)) |
C-g | #'klondike-stack-pick-or-select-quit |
If you set the variable klondike-simplified-card-moving-p
to t
,
picking a particular tableau (using 1
through 7
) will then, still,
assume that using 1
through 7
, again, means you want to move all
of the available cards in the tableau to another tableau but, if the
tableau specified isn’t a valid stack to move the cards, Klondike will
assume you meant to select one of the available face-up cards to,
then, move only a portion of the cards to another tableau.
So, if you press 5
, Klondike will check if it can move all of the
face-up cards of the currently selected tableau to tableau 5
; if it
cannot, it will select the face-up card labeled with 5
in the
currently selected tableau so you can move only those cards (an
operation that, previously, had to be done with F5
in order for
Klondike to tell whether you wanted to move everything of the
currently selected stack or select a subsection of the currently
selected stack).