Solitaire Klondike

⭐ 0 (0 Reviews)
🎮 71 Plays
🔲 New Window

📝 Description

Are you ready for a classic solitaire game? In this game, which is among the most popular games of the game, you place the cards on the racks and solve the queues.

📋 Instructions

"mousedown" on facing down card will "flip" the card

"mousedown" on facing up card will:
store in "cardFrom" which cell has been pressed and the clicked card in that pile

"mouseup" will: store in "cardDestination" which cell is under the mouse cursor and the last card in the pile

run a function to check if the movement is valid

clear the cadrFrom and cardDestination variables

the validating function will:

in tableaus the validating function:

if cardFrom number == cardDestination number+1 && cardFrom color != cardDestination color:

remove last cards from the cardFrom column
add cardFrom card or cards to cardDestination
in the foundations, the same will happen but with ascending numbers and only with same suit type

check for win condition:

if all same-suit piled up cards contains 13 cards, the game is over

🎯 Categories

💭 Comments

🎮 You May Like

×

Report Game