Skip to content

♠️♥️♣️♦️ Web-based JavaScript implementation of the popular game - Solitaire.

License

Notifications You must be signed in to change notification settings

mirokrastanov/solitaire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solitaire

A JavaScript implementation of the popular game - "Solitaire".

Live Demo

run-button

The Demo is also available in my app library

Description

Solitaire is a single player tabletop card game which involves placing cards in a layout, and sorting them according to specific rules.

Rules

  • Solitaire is played with a standard 52-card deck, without Jokers.
  • After shuffling, a tableau of seven fanned piles of cards is laid from left to right. From left to right, each pile contains one more card than the last. The first and left-most pile contains a single upturned card, the second pile contains two cards, the third pile contains three cards, the fourth pile contains four cards, the fifth pile contains five cards, the sixth pile contains six cards, and the seventh pile contains seven cards. The topmost card of each pile is turned face up.
  • The remaining cards form the stock and are placed facedown at the upper left of the layout.

board-image

- The four foundations (light rectangles in the upper right of the board) are built up by suit from Ace (low in this game) to King, and the tableau piles can be built down by alternate colors. Every face-up card in a partial pile, or a complete pile, can be moved, as a unit, to another tableau pile on the basis of its highest card. Any empty piles can be filled with a King, or a pile of cards with a King. - The aim of the game is to build up four stacks of cards starting with Ace and ending with King, all of the same suit, on one of the four foundations, at which time the player would have won.

How to play

  1. Read the rules above.
  2. Click on a card you would like to move.
  3. If there are no possible valid moves use the stock to reveal an extra card.
  4. If the stock is empty, but there are still cards in the waste - click on the empty stock and it willo automatically move the cards in the waste to the stock again.
  5. Hover* over the spot you would like to place a card and click again to do so.
  6. Fill the 4 foundations with the cards from Ace to King, sequentially and you win.
  • When hovering over the correct pile/card you will receive visual hints confirming you are correct and you can do the move you want. The hints include a little zoom, a color change or both.
  • You would also receive a visual highlight upon selecting a card as well. After you click to select the card you want to move, this highlight would be replaced with the above helping effect, automatically.
  • For more information on how to play the game please read the above section - #Rules.

Game Screenshots

board-image

board-image

board-image

board-image

board-image

board-image

Live Demo

run-button

About

♠️♥️♣️♦️ Web-based JavaScript implementation of the popular game - Solitaire.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published