Skip to content

Latest commit

 

History

History

Solitaire

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Solitaire


Description 📃

This is a digital version of the classic Solitaire card game developed using JavaScript, HTML, and CSS. The game follows the traditional rules of Solitaire, where the objective is to move all cards to their foundation piles by arranging them in ascending order and by suit. It's a single-player game that provides a fun and challenging experience for users.

Functionalities 🎮

Drag and Drop: You can move cards by dragging them from one pile to another. Click and hold the card you want to move, drag it to the desired destination, and release the mouse button to drop the card.

Move Counter: The game keeps track of the number of moves you make while playing. You can use this as a measure of your progress or challenge yourself to complete the game with the fewest moves possible.

Timer: The game includes a timer that starts as soon as you begin playing. It tracks the time taken to complete the game, allowing you to challenge yourself to beat your previous records.

How to play? 🕹️

  • Setup: The game begins with 52 playing cards shuffled and dealt into seven tableau piles. The first pile has one card, the second has two cards, and so on until the seventh pile, which has seven cards. The remaining cards form the stock pile.

  • Objective: The goal is to move all the cards to four foundation piles, one for each suit, in ascending order (Ace to King).

  • Gameplay: You can move cards in the following ways:

    i) Tableau Piles: Cards in the tableau can be moved onto another tableau pile if the top card of the destination pile is of the opposite color and one rank higher. For example, you can move a black 10 onto a red Jack.

    ii) Foundation Piles: Aces can be moved to the foundation piles, and then cards of the same suit can be placed in ascending order on the Aces. For example, you can move the Ace of Hearts to the Hearts foundation, followed by the 2 of Hearts, 3 of Hearts, and so on.

    iii) Stock Pile: Click on the stock pile to draw cards. These cards can be moved to the tableau or foundation piles following the rules mentioned above. When the stock pile is empty, you can click on the empty space to flip over the waste pile and create a new stock pile.

  • Winning: You win the game when all cards are successfully moved to the foundation piles in ascending order and by suit.


Screenshots 📸

Solitaire

Working video 📹

Solitaire.-.Google.Chrome.2023-07-06.01-29-06.mp4