Games: Add help entries for Solitaire and Spider

This commit is contained in:
Andrea Giancola 2022-11-30 11:23:00 +01:00 committed by Sam Atkins
parent a559e26f68
commit 21647b9a4e
Notes: sideshowbarker 2024-07-17 03:21:11 +09:00
2 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,58 @@
## Name
![Icon](/res/icons/16x16/app-solitaire.png) Solitaire - The Solitaire card game
[Open](file:///bin/Solitaire)
## Synopsis
```**sh
$ Solitaire
```
## Description
Solitaire is an implementation of the classic solitaire card game Klondike, which became very popular in digital form during the 90s after being included in Microsoft Windows OS.
The game is played with a standard 52-card deck. Objective of the game is completing four distinct ordered sequences of cards (*foundation*), one per suit, from Ace to King.
After shuffling the deck, the game starts, with a setup (*tableau*) of seven vertical piles of cards, increasingly longer: the first pile is one card long, the seventh is seven cards long. Only the top card of each pile is upturned and accessible. The unused cards (*stock*) are kept aside, covered.
Cards can be moved from one pile of the tableau to another only by building contiguous descending sequences of alternate color: for example, King of Diamonds / Queen of Clubs, or 5 of Spades / 4 of Diamonds / 3 of Clubs. Within that rule, multiple cards can be moved at the same time. If one of the seven piles is empty, a new pile can be built there, starting with a King.
The top card from any pile can be detached and added to the foundation, if it is the next card in the sequence for that suit. The foundation sequence goes from the Ace up.
When a new card reaches the top of the pile, it is turned face up. A card which is upturned is never turned face down, even if it is not at the top of the pile anymore.
When no more moves are available, one (or, in a different variant, three) card(s) is taken from the stock and turned up. It can be added either to the tableau piles or to the foundation; if neither is possible, it goes to the waste.
The game can conclude in one of two different ways: (a) the game is won if all 52 cards are moved to the foundation (b) the game is lost if no more progress can be achieved towards the foundation.
## Examples
foundation
♠ A ♥ 2 ♦ 3 ♣ A
pile 1 pile 2 ...
♥ 3 ♦ K
♠ Q
Basic move: the ♠ Q can be shifted from pile 1 to pile 2, since (♦ K - ♠ Q) is a valid descending sequence. Now the ♥ 3 can be taken from pile 1 and moved to the foundation, because it is the next card in the Hearts sequence after the Two.
pile 1 pile 2 ...
♥ 3 ♦ K
♠ Q
♥ J
Multiple-card move: same as before, except the Q and J on pile 1 must be moved together to pile 2 to produce the sequence (♦ K - ♠ Q - ♥ J).
pile 1 pile 2 ...
♥ 3 ♦ K
♠ Q
♠ J
No move: no alternating-color sequence can be produced here.

View file

@ -0,0 +1,60 @@
## Name
![Icon](/res/icons/16x16/app-spider.png) Spider - The Spider card game
[Open](file:///bin/Spider)
## Synopsis
```**sh
$ Spider
```
## Description
Spider is an implementation of the classic solitaire card game with the same name, which became popular in digital form after its inclusion in Microsoft Windows XP.
In this version, the game is played with 104 cards, forming 8 complete (A to K) instances of either 2 different suits or a single suit, as chosen from the in-game menu.
After shuffling together the cards, the game starts, with a setup (*tableau*) of 54 cards over 10 vertical piles. Only the top card of each pile is upturned and accessible. The unused 50 cards (*stock*) are kept aside, covered, and dealt 10 at a time (1 per pile), when no more moves are possible on the current tableau.
Objective of the game is removing all the cards from the tableau and stock.
A single card can be moved from the top of one pile of the tableau to another, regardless of the suit, but only if its value is one less than the current top card on the destination pile: for example, a Queen of Diamonds can be moved onto a King of Spades; multiple cards can be moved at the same time only if they constitute a contiguous descending sequence of a same suit: for example, King of Diamonds / Queen of Diamonds / Jack of Diamonds.
A complete King-to-Ace sequence of the same suit can be removed from the tableau. Any card(s) can be moved on an empty pile, respecting the aforementioned rule for multiple cards.
When a new card reaches the top of the pile, it is turned face up. A card which is upturned is never turned face down, even if it is not at the top of the pile anymore.
When no more moves are available, 10 more cards are moved from the stock to the piles, 1 per pile, and turned face up.
The game can conclude in one of two different ways: (a) the game is won if all cards are removed from the tableau, and the stock is empty (b) the game is lost if no more progress can be achieved.
## Examples
pile 1 pile 2 ...
♥ 3 ♦ K
♠ Q
Basic move: the ♠ Q can be shifted from pile 1 to pile 2, since (K - Q) is a valid sequence.
pile 1 pile 2 ...
♥ 3 ♦ K
♠ Q
♠ J
Multiple-card move: same as before, except the Q and J on pile 1, constituting a valid in-suit sequence, can be moved together to pile 2 to produce (K - Q - J) sequence.
pile 1 pile 2 ...
♥ 3 ♥ K
♠ K
♥ J
No move: no contiguous descending sequence can be produced here.