Klondike Solitaire

Public domain classic

The solitaire everyone knows. Build four piles from ace to king.

Klondike Solitaire

At a glance

Rules
Standard Klondike: one 52-card deck, 7 piles, 4 foundations
Draw
One card or three, chosen when you deal
Players
Solo
Controls
Drag a card or a run, or tap a card and then a glowing destination. Double-tap a top card to send it to its foundation. Ctrl or Cmd and Z undoes, Esc opens the menu
Help
Unlimited undo, and a hint that shows one legal move
Saves
Wins, deals, best score, best time and total moves, in this browser only
Cost
Free, no account

How this Klondike works

  • Seven piles are dealt with one card in the first, two in the second and so on, with only the top card of each face up.
  • Build the piles down in alternating colours. Only a king, or a run that starts with a king, can fill an empty pile.
  • Build the four foundations up by suit, from ace to king. All 52 there wins the deal.
  • Tap the stock to turn cards onto the waste, one or three at a time. When the stock runs out, tap it again to turn the waste back over. There is no limit on passes.
  • Score: +10 for a card to a foundation, +5 for turning up a face-down card, and -15 for taking a card back off a foundation.
  • When the game finds no useful move left, even after cycling the stock, it tells you no moves remain. You can also end a deal yourself from the menu.

Tips that win more deals

  • Dig where it is deepest. Turn up cards in the piles with the most face-down cards first: that is where the cards you need are hiding.
  • Keep an empty pile for a king. Only a king can fill a gap, so clear a pile when a king is ready to move in, not before.
  • Aces up at once, low cards with care. An ace on a foundation never hurts. A two or three may still be needed to hold a red or black card below it.
  • Try the hint when stuck. It shows one legal move, and undo lets you take back any experiment.

The same code as FreeCell and Spider

Klondike, FreeCell and Spider Solitaire here are three copies of one game file. Only the mode, the title and the accent colour differ. They were built together on 2026-10-15, and one rule test covers all three modes.

Known limits

  • After a win, Play Again asks you to confirm a fresh table before it deals.
  • No keyboard play for moving cards: you need a mouse or touch.
  • If your browser blocks storage, your wins and best times are not kept.
  • The game pauses itself when you switch tabs.

How it was built and checked

AI tool
Codex
First committed
2026-10-15, in a batch of nine card games
Size
One HTML file of about 170 lines, no game libraries
Rounds of changes
1, from the build record
Checked at build
The build report: 5,884,856 rule assertions over 300 seeded deals in both draw modes, 108,500 random legal moves with undo checked along the way, and one complete 52-card winning route
Checked since
2026-11-11: the same rule test passes again, and an automated browser check at desktop size (1280 by 720) and phone size (390 by 844) turned the stock, moved a card by tapping it and then its destination, undid that move, finished a deal one move from winning, and dealt again
Played on a phone
2026-11-11, a full game on a real phone before this page went live

Embed Klondike Solitaire on your site

Free to embed. Please keep the credit link.

<div style="position:relative;padding-top:75%;max-width:640px"><iframe src="https://aivibecodedgames.com/games/klondike-solitaire/" title="Klondike Solitaire (free browser game)" style="position:absolute;inset:0;width:100%;height:100%;border:0" loading="lazy" allow="fullscreen" allowfullscreen></iframe></div>
<p><a href="https://aivibecodedgames.com/play/klondike-solitaire/">Play Klondike Solitaire free</a> on AI Vibe Coded Games</p>

How it was vibe coded

ToolCodex
Rounds of changes: 1
First committed2026-10-15

The opening prompt

Make Klondike solitaire with a standard 52-card deck. Seven tableau piles (1 to 7 cards, top card face up), a stock and a waste, four foundations built up by suit from ace to king, tableau built down in alternating colours, and only a king or a king-led run may go into an empty pile. Offer a draw one or draw three setting. Support drag and drop and also tap to select then tap the destination; double-click or double-tap a card to send it to a foundation. Unlimited undo, a hint button, new deal, move counter and timer, and a win animation with bouncing cards. The stock recycles when it runs out. Save wins and best time.

What we learned

  • Klondike, FreeCell and Spider are three copies of one game file with a mode switch. One rule test covers all three, but a fix has to be copied into each file.

Game controls

  • Drag a card, or tap it and then tap where it goes
  • Double-tap a card to send it to its pile
  • Draw one or draw three

The game brief includes touch controls for phones.

Open the game on its own

More games