Play four in a row with a friend by sending links

Play four in a row with a friend by sending links, with no account and no server.

Red, you, to moveYellow
column 1, 0 of 6 filled
column 2, 0 of 6 filled
column 3, 0 of 6 filled
column 4, 0 of 6 filled
column 5, 0 of 6 filled
column 6, 0 of 6 filled
column 7, 0 of 6 filled
emptyemptyemptyemptyemptyemptyempty
emptyemptyemptyemptyemptyemptyempty
emptyemptyemptyemptyemptyemptyempty
emptyemptyemptyemptyemptyemptyempty
emptyemptyemptyemptyemptyemptyempty
emptyemptyemptyemptyemptyemptyempty
Moves

    Your move, red. Choose a column.

    Shown to your friend in the link.

    Who moves first

    Drop a disc, then send the link to a friend. They open it, drop one back, and send it again.

    About these links

    The link holds every move so far, both names, and a code that catches typos. Nothing is stored on a server, so there's no account to sign in to. The part after the # isn't sent to our server when you open a link, and this page removes it from the address as soon as it starts. The site's analytics may still see an address, so keep anything private out of a name. Your browser keeps your own copy of each game. Links can be edited. This page checks that every move is allowed and, if this device has the game, that no earlier move was changed. It can't tell whether your friend really sent a link. Play with people you'd trust with a paper board.

    Check this link

    Settings

    Saved on this device.

    How it works

    Four in a row is played on a 7 by 6 board: you take turns dropping a disc into a column, and the first to line up four of their colour, across, up or diagonally, wins. If the board fills first, it's a draw.

    Here, each move makes a link. The link holds every move so far, both names and a short code that catches typos, written in letters and digits after the # in the address. Send it in any chat; your friend opens it, sees the last disc ringed, drops one of their own, and sends the new link back. Nothing is stored on a server, and the part after the # isn't sent to our server; the page removes it from the address as soon as it starts. Each device also keeps its own copy of the game.

    Links can be edited, by anyone who holds one. The page checks that every move is allowed, and on a device that has the game it checks that no earlier move was changed, but it can't tell whether your friend really sent a link. Play with people you trust. You choose who moves first, a rematch swaps it, and you can take a move back until you copy its link.

    Questions people ask

    How do you play four in a row by link?
    One player makes a move, copies the link under the board and sends it in any chat. The other opens it, makes a move, and sends the new link back. Each link holds the whole game, so there's no account and nothing stored on a server.
    Can someone cheat by editing the link?
    Yes, a link can be edited by anyone who holds it, including your opponent. The page checks that every move is allowed and, on a device that has the game, that no earlier move changed, but it can't prove who made a link. Play with people you trust.
    Who wins four in a row with perfect play?
    The first player, if they start in the middle column. The game is solved: with perfect play, the first player can force a win on or before the 41st move. Real games are not perfect, and the page lets the starter choose who moves first and swaps it in a rematch.
    What happens if I open an old link?
    You'll see the latest version of the game on this device and a note that the link was older. If a link changes a move you've already seen, the page asks before using it.
    Why isn't it called Connect Four?
    "Connect Four" is a trademark (first sold by Milton Bradley in 1974), so this page uses the game's generic name, four in a row.

    Sources

    1. Wikipedia: Connect Four (rules, solved game, trademark)
    2. Wikipedia: Tic-tac-toe
    3. Wikipedia: m,n,k-game
    4. RFC 3986: URI generic syntax, section 3.5 Fragment
    5. RFC 4648: base64url
    6. Catalogue of parametrised CRC algorithms: CRC-16/IBM-3740
    7. Branch Chess README (chess by link)