Skip to content
← Back

Connect Four

Turn: Player 1
Player guide

How to play Connect Four

Connect Four is a two-player strategy game on a 7-column, 6-row grid. Take turns dropping discs into the columns; they fall to the lowest free space. The first player to line up four discs horizontally, vertically or diagonally wins.

Rules

Player 1 (red) goes first, then players alternate. Click a column to drop your disc into it; a full column cannot be played. Four of your discs in a straight line, in any direction, win the game and the line lights up. If all 42 spaces fill with no line of four, the game is a draw.

Controls

  • Click or tap any cell in a column to drop a disc there.
  • The status line shows whose turn it is.
  • New Game clears the board.

Winning strategy

  • Start in the centre column; it is part of more possible lines of four than any other.
  • Before every move, check whether your opponent can win next turn, and block it.
  • Build threats that create two winning spots at once; your opponent can block only one.
  • Avoid filling the space directly below your opponent's winning spot, because that lets them drop into it.
  • Think in rows from the bottom up: the lower threats usually decide the endgame.

History

Milton Bradley published Connect Four in 1974. In 1988, James D. Allen and Victor Allis independently solved it: with perfect play, the first player wins by starting in the middle column.

FAQ

  • Who goes first? Player 1, shown in red. Swap who starts between games to keep it fair.
  • Is there a computer opponent? Not yet; this version is for two players on one device. Our tutorial shows how to build a simple AI.
  • Can Connect Four end in a draw? Yes, if all 42 spaces are filled without anyone making four in a row.

Build it yourself

Curious how this game works? Our step-by-step tutorial How to Make Connect Four in JavaScript rebuilds it from this page's code, with examples you can copy.

Drop colored discs to connect four in a row. Block your opponent while building your own line. Vertical strategy game that requires planning ahead. Play against AI or friends.