About this game
Four in a Row is a two-player board game you play against the computer in your browser. Take turns dropping discs into a seven-column grid; the first to line up four in a row, column or diagonal wins. The computer plans by searching ahead: two turns on Easy, four on Normal and seven on Hard.
How to play
- Choose a mode in the start dialog: against the computer, two players on one device, or watch the computer play itself. Against the computer, also choose Easy, Normal or Hard.
- On your turn, pick a column. Your disc drops to the lowest empty space in it.
- Line up four of your discs across, down or diagonally to win.
- If the board fills up with no line of four, the game is a draw.
Controls
| Input | Action |
|---|---|
| Click or tap | Drop a disc in a column |
| Keys 1 to 7 | Drop a disc in that column |
| Tab, then Enter | Reach the column buttons and choose one |
Screenshots

AI in this game
- Search AI
- Search AI
Minimax search with alpha-beta pruning and a hand-written evaluation, run in your browser. Faveden added a strength choice: search depth 2 (Easy), 4 (Normal, the original setting) or 7 (Hard). The status line shows when it is thinking.
How this game was made
- Original game: c4 by Kenrick, published under the MIT License.
- Faveden renamed it, removed its online mode and outbound links, and added a strength choice and a thinking status. Every change is listed in the package's PROVENANCE.json.
- Reviewed by Faveden before listing: licence check, source review, and automated play tests in Chrome and Safari engines.
Comments
Loading comments…