Games
Four In A Row
Drop tokens into columns. They stack from the bottom. First to four in a row — horizontal, vertical, or diagonal — wins. Play vs. me at four difficulties, or 1-on-1 over a peer-to-peer room with a friend.
Controls
Multiplayer lobby
Codes are 4–32 characters: A–Z, 0–9, and dashes.
4–32 characters: A–Z, 0–9, and dashes.
Room ---- is locked.
Ask the host to let you in. They can unlock the door from their lobby.
You were removed from this room.
The host can let you back in. Try a different code or a different name if you'd rather move on.
Connecting…
Still trying to reach the room — your previous connection may need a moment to release. If this persists, refresh this tab.
How does this work?
One player opens a room and shares the 4-letter code or QR. The other player types the code (or scans the QR, or opens the share link). Direct WebRTC peer connection — no servers between you. School Wi-Fi sometimes blocks peer connections; if it does, switch to cellular. No accounts, no signup — just a display name.
Room code
Seats
Watching 0
No spectators yet. Anyone with the code can watch.
Banned (0)
Match starts the moment a friend joins.
Seats
Room: ----
Four In A Row board
Your move (blue).
Actions
Status
Chat
About this page
The computer player is an alpha-beta minimax search over a position-evaluation function: it counts how many three-in-a-rows each side has with an open fourth cell, weights central- column control (the centre column is provably the strongest opening), and looks two, four, six, or nine moves ahead at the four difficulty levels. Search runs in a Web Worker so the UI stays responsive while the engine thinks.
Friends mode is a peer-to-peer 1-on-1 game over WebRTC, brokered by a public signaling service for the initial handshake only. No accounts, no server-side game state, no app install. The host's browser is authoritative; both peers render from snapshots. Spectators get a read-only view.
Nothing leaves your browser. The game, your move history, and your win/loss stats stay local. Per-difficulty stats are kept in your browser's localStorage; clearing site data resets them. No accounts, no leaderboards, no telemetry beyond the site-wide page-view counter.
The four-in-a-row format is commonly called by another, trademarked name. This page uses the descriptive name throughout to keep clear of that mark, and the colour scheme (blue tokens vs. red on a deep-blue frame) is the site palette rather than the toy's.
How to play
The board. Seven columns by six rows. Tokens drop into a column and stack from the bottom — you can't place mid-column. You play blue; the computer (or your opponent in Friends mode) plays red.
Taking a turn. Click any column. The token slides down to the lowest empty cell in that column. On mobile, tap the column header strip above the board or anywhere inside the column.
Winning. The first player to align four of their own tokens in a row — horizontally, vertically, or diagonally — wins. The four winning tokens pulse to show you exactly which line scored.
Drawing. If the board fills up with no four-in-a-row, the game is a draw. Neither side's score changes in a multi-game match.
Difficulty. The Level chips control the computer's search depth: Easy looks 2 moves ahead, Medium 4, Hard 6, Expert 9 with iterative deepening. Higher levels take longer to respond.
First move. The first mover has a theoretical winning strategy under perfect play. The First-move toggle lets you hand the opening to the computer if you want a tougher game.
Hint. The Hint button highlights the column the engine would play if it were you, at the current difficulty. It never drops the token for you.
Undo. Undo backs up your last move and the computer's reply together, returning to the position before your last decision. Hint and Undo are Solo-only.
Score by difficulty
Best of 3
Your record vs. the computer
0-game win streak
0-game win streak
0-game win streak
0-game win streak
Stat tracking is unavailable in this browsing mode (private browsing or storage disabled). Gameplay still works for this session.
Room
Seats
Watching 0
No one is watching right now.