Play Card War against the computer: press Flip, the higher card wins, a tie is a war. Big button, auto-play and short games for young children.
Game #-
Flips 0
Wars 0
Played 0
Won 0
Biggest pile won -
You
Pip
Press Flip. Both players turn over the top card and the higher card takes both. If the cards match, it is a war: each player puts cards face down, flips one more, and the higher one takes the whole pile. Turn on Auto-play to let the game flip by itself, and pick a Quick game for a short one. Keyboard: Tab to the Flip button and press Enter or Space; press A to turn auto-play on or off.
A standard 52-card pack is shuffled with a seeded shuffle and split 26 and 26, so the game number always gives the same deal, and the address of this page carries it. Ace is the highest card, 2 the lowest, and suits never matter. On a tie there is a war: each player puts 3 cards face down and flips one more, and the higher card takes the whole pile. A tie in the war starts another. A player with fewer than 4 cards puts all but one face down and flips the last. A player with no card left for a war loses it. Won cards are shuffled and kept in a won pile. When a draw pile runs out the won pile is shuffled to become the new one, so the order never repeats in a loop. Every game ends. It finishes when one player has all 52 cards, or after the flips you chose: 15 for Quick, 40 for Medium, and at the latest 600 flips for a whole game. When time is up the player with more cards wins, and equal cards is a tie. A war counts as one flip. The computer has no choices to make in this game, so it only pauses for a moment before turning its card.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
Press the big Flip! button. You and Pip each turn over the top card of your pile. The higher card wins both cards. Aces are highest and 2s are lowest, and the suits do not matter.
If both cards have the same rank, it is a war. Each player puts three cards face down and flips one more, and the higher of those two cards wins the whole pile. If they tie again, there is another war. A pile can grow big, and the stat line keeps the biggest pile you have won.
If a player does not have enough cards for a full war, the rules still work: a player with fewer than four cards puts all but one card face down and flips the last one. A player with no card left to flip for a war loses it.
Won cards go to a won pile, shuffled. When your draw pile runs out, your won pile is shuffled and becomes your new draw pile. You never have to do anything about it.
Game length. The default is Quick, which stops after 15 flips, so a game takes a minute or two. Medium is 40 flips. Whole game plays until one player has all 52 cards, or stops after 600 flips. When a game stops at its limit, the player with more cards wins, and equal cards is a tie. A war counts as one flip.
For little ones. The Flip button is large. Turn on Auto-play and the game flips by itself, so a small child can just watch the cards, and you can choose a slow, normal or fast pause between flips. Nothing can go wrong and nothing is timed. Each flip is shown one step at a time: your card, then Pip’s card after a short pause, then who takes the pile, with the winning card raised and outlined in amber. A bar shows who has more cards.
Keyboard and screen reader. Press Tab to the Flip button and press Enter or Space. Press A to turn auto-play on or off. Every step is spoken: “You flipped the 9 of hearts. Pip flipped the 4 of clubs. You win the flip and take 2 cards.” In a war the status line says how many cards are put face down and names the war cards.
Pip pauses for a short, fixed moment before turning its card, and for less if your system asks for reduced motion. With reduced motion there is also no card animation.
The game has a number, and the page address carries it with the length and speed. Copying the address, or using Copy result, gives someone else the same deal. Restart this game replays that deal from the beginning.
A card is a number from 0 to 51: the suit is the number divided by 13, rounded down, and the rank comes from the remainder. The shuffle is a Fisher-Yates driven by a small seeded generator, so a game number always gives the same split. The seed is drawn from the browser’s secure random source, from 1 to 999,999, and an address can carry any whole number up to 4,294,967,295. The same generator shuffles each pile of won cards, so a whole game can be replayed from its number.
The rules live in a plain TypeScript module with no page code in it. A flip returns the new state and a record of every face-up comparison, so the page can show a war step by step. The page then reveals those steps one at a time.
Card War has no decisions, which makes the ending rule the interesting part. If won cards always went to the bottom of a pile in a fixed order, a game could repeat forever. Shuffling each won pile breaks that, and the flip limit makes the finish certain: no whole game goes past 600 flips.
The tests check these claims:
Nothing is uploaded and there is no account. Games played, games won and the most cards you have won in one flip are saved in your browser’s local storage as small numbers inside a small JSON object, under one key. Stored values that are not whole numbers within a sensible range are ignored when read. Clearing site data removes them. The only other state is the page address.
Everything runs locally in your browser.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.