Four in a Row Game

Drop your discs into the columns and get four in a row before your opponent: across, down or diagonally. Play against the computer or with a friend.

  • Free
  • 3 computer levels
  • 2 players on one screen
  • No sign-up
You0
Draws0
Computer0

Games played: 0 Win streak: 0 Best streak: 0

Your turn

Tap a column to drop a disc. Keyboard: arrow keys then Enter, or the numbers 1 to 7; N for a new game, U to undo.

100% private — Everything is processed directly in your browser: your files, voice, and image are never sent to Chatzam's servers.

How to play four in a row

  1. Pick a mode

    Take on the computer (easy, medium or hard) or play with a friend on the same device. You also choose who goes first, or let it alternate every game.

  2. Drop a disc

    Tap or click a column: your disc falls to the lowest empty space. On a keyboard, move with the left and right arrow keys and press Enter, or type the column number from 1 to 7.

  3. Line up four discs

    The first player to line up four discs of their color, horizontally, vertically or diagonally, wins, and the four winning discs start to pulse. If the grid fills up with no line of four, the game is a draw.

A four in a row game that feels good to play

A computer opponent with three levels

Easy makes plenty of mistakes, medium looks a few moves ahead, and hard calculates several moves deep in a quarter of a second and punishes most errors. On a slower device it looks a little less far in the same time, and it varies its play between equally good moves.

Animated drops and highlighted wins

Each disc falls with a short animation, and the four winning discs are circled and pulse. Animations are toned down if your device is set to reduce motion.

Colors everyone can tell apart

The discs are blue and orange instead of red and yellow, and each has a different pattern in the center, so you can tell them apart even if you don't see colors well.

Undo, scores and resume

Take back your last move, track your wins and your winning streak for each level, and pick up your game where you left off when you come back. Everything is saved on your device.

Four in a row rules

The game is played on an upright grid with seven columns and six rows. Each player has discs of one color. Players take turns choosing a column and dropping a disc into it: gravity pulls it down to the lowest empty space. The goal is to get four of your discs in a line, horizontally, vertically or diagonally, before your opponent does. If all forty-two spaces are filled without a line of four, the game is a draw. The rules take a minute to learn, but winning means thinking several moves ahead.

Four in a row strategy: how to win

Take the center column: it is part of more possible lines than any other, so center discs are worth the most. Try to build two threats at once, since your opponent can only block one of them. Diagonal threats are the easiest to miss, so check them on every move. Watch out for "poison" squares: playing directly below a space your opponent needs often hands them the win. Finally, whether a column has an odd or even number of empty spaces can decide who will be forced to play under a threat. As the first player, aim for threats on odd rows (counting from the bottom); as the second player, aim for even rows.

How the computer thinks

The computer tries out moves for itself and for you, several turns ahead, then scores the resulting position: discs in the center, three in a row with an open space, the opponent's threats. It picks the move that leads to the best score, choosing at random between equally good moves, and it skips pointless lines of play right away using a technique called alpha-beta pruning. The medium level looks four moves ahead. The hard level searches as deep as its time limit allows, often six to eight moves ahead in the middle of the game and more near the end, which makes it a tough opponent: to beat it, you need to set a trap several moves in advance or take advantage of a weak opening.

Play on your phone, computer or with a friend

On a phone, just tap the column you want, with no double-tap or accidental zoom. On a computer, hover over a column to preview your disc, click to drop it, or use the keyboard. Two-player mode lets you play face to face with a friend on a single screen. The game runs in your browser, with nothing to install and no account needed.

Frequently Asked Questions

How many discs do you need in a row to win?

Four discs of the same color next to each other, horizontally, vertically or diagonally. The grid is seven columns wide and six rows high.

Can you beat the computer on hard?

Yes, but it isn't easy: it calculates many moves ahead. Control the center column, create two threats at once, and never leave it a winning space just above one of yours.

Who has the advantage, the first or the second player?

With perfect play, the first player can force a win by starting in the center column. In real games both players make mistakes, and going first is only a slight advantage.

How do I play with two players?

Choose "2 players". Pass the device back and forth and take turns tapping a column. Wins are counted on this device, separately for each mode and level, until you reset them.

Why aren't the discs red and yellow?

The discs are blue and orange, with a different pattern in the center, so they are easy to tell apart for people who have trouble seeing some colors.

Are my games saved?

Your current game, chosen level, scores and winning streaks are stored in your browser, on your device only. Nothing is sent to a server.

Other free tools

All games and random pickers →

Rate this tool
Be the first to rate this tool