๐ด Connect Four
A classic board game on a 7-column by 6-row grid: two players take turns dropping pieces, and whoever connects four of their own pieces first โ horizontally, vertically, or diagonally โ wins. Play against a friend on the same screen.
How to use
- Click a column to drop a piece into the lowest open slot in that column.
- Player 1 (red) and Player 2 (yellow) alternate turns.
- Connect four of your pieces in a row (any direction) to win. If the board fills up with no winner, it's a draw.
How the calculation works
Connect Four: two players take turns dropping pieces into a board of 6 rows and 7 columns, and the first to line up four of their own pieces across, down or diagonally wins. Both players share one screen. A piece falls to the lowest empty space in the chosen column; full columns cannot take more. If all 42 spaces fill without four in a row, the game is a draw. Computer analysis has shown that the first player can always win by starting in the centre column and playing perfectly.
Worked example
Winning ideas โข The centre column (the 4th) is part of the most possible lines of four. โข Block as soon as your opponent has three in a row. โข Pieces stack from the bottom, so avoid filling the space under a square you do not want your opponent to reach. There are about 4.5 trillion possible positions.
Things to be aware of
- Diagonal lines are easy to miss; check before you drop.
- There is no computer opponent; it is a game for two players.
- Results are kept only while the page is open.
FAQ
What happens when a column is full?
You can no longer drop a piece into that column โ clicking it does nothing. Choose another column instead.
Do diagonal connections count as a win?
Yes. Both horizontal and vertical lines, as well as both diagonal directions, are checked for a four-in-a-row win.
Can I play against a computer opponent?
No, this currently only supports local two-player mode where both players take turns on the same screen.