Quick start
- Choose Play computer for a solo round or Play a friend for two people sharing one device.
- Use the numbered column buttons to drop a piece into the lowest open space.
- Connect four pieces across, down, or diagonally before the other player.
- Use Undo carefully: friend mode removes one move, while computer mode removes the latest human-computer turn pair.
Best uses
Use this guide when you want a quick rules check, a clearer move routine, or simple strategy ideas before your next round.
- Play a quick two-player strategy round on one phone, tablet, or computer.
- Practice spotting immediate wins, blocks, forks, and diagonal lines against the computer.
- Use a keyboard, touch screen, or screen reader with the same board.
- Keep local session wins and draws while playing several rounds.
What this tool helps with
Four in a Row is a two-player strategy game on a 7-column by 6-row board. Each piece falls to the lowest empty space in the chosen column, and the first player to connect four pieces across, down, or diagonally wins.
Match each input label on the tool to the friend or computer mode you want and the numbered column where each piece should fall.
The logic in plain language
Each turn is one column choice. The engine places the piece in the lowest empty row, checks the board for a four-piece line, and reports a draw only when all 42 spaces are full with no winner.
The page uses the MIT-licensed @kenrick95/c4 engine to accept legal drops, detect wins or draws, and choose computer moves. Access Free Tools adds the responsive board, keyboard and screen-reader controls, undo history, and local score display.
How to read the answer
Read the turn message above the board, then scan the highlighted pieces after a win. Teal pieces have one stripe direction and coral pieces have the opposite pattern, so the game does not rely on color alone.
- The status line names the current turn, computer thinking state, win, or draw.
- A bright outline marks the four pieces that completed the winning line.
- The score strip counts wins and draws for this browser session only.
- A disabled column button means that column is full or the computer is taking its turn.
Common mistakes to avoid
Most lost rounds start with one missed check: an immediate winning move, an immediate block, or a move that gives the other player two threats at once.
- Do not place a piece before checking whether the other player can win on their next move.
- Do not watch only horizontal lines. Vertical and diagonal threats can be less obvious.
- Do not fill one edge without a plan. Center pieces can take part in more possible four-piece lines.
- Do not treat the browser opponent as a perfect solver. It is meant for quick practice.
Use the win, block, build check
Before every move, ask three questions in order. Can I win now? Can the other player win next? If neither answer is yes, which move builds the strongest useful threat?
This short check prevents many avoidable losses. It also keeps you from building a clever-looking line while leaving the opponent an open fourth space.
- Win: take an immediate four-piece line when one is available.
- Block: cover the opponent's only open winning space.
- Build: prefer moves that create more than one future route without opening a reply win.
Why the center columns matter
A center piece can join horizontal and diagonal lines in more directions than a piece on the far edge. That does not make every center move correct, but it gives early pieces more ways to stay useful.
Edge columns still matter for blocks and planned diagonals. Use the center as a strong default, then let the actual board decide.
How to spot diagonal threats
A diagonal space can only be played after the spaces below it are filled. Look at the support pieces under a possible diagonal, not just the four target spaces.
When you build that support, check who benefits. A piece dropped to prepare your diagonal can sometimes give the opponent the exact platform they need.
Friend mode, computer mode, and privacy
Friend mode alternates Player 1 and Player 2 on the same device. Computer mode lets you move first and asks the local browser engine to choose the reply.
The game does not need an account, leaderboard, opponent connection, or saved profile. Moves and session scores are not sent to a game server.
Research and references
The game engine source documents the MIT-licensed rules and computer logic. The official game instructions support the basic board and win rules. Google's people-first guidance supports keeping this page useful as a real game and guide rather than creating a broad thin-content games section.
Worked examples for Four in a Row Game
Four connected pieces across one row
Four connected pieces in one column
Block the only open fourth space
FAQ in plain language
What is the goal in Four in a Row?
Be the first player to make one continuous line of four pieces. The line can be horizontal, vertical, or diagonal.
How large is the board?
The board has 7 columns and 6 rows. Pieces enter from the top and occupy the lowest open space in the selected column.
Who goes first?
Player 1 goes first in every new round. You are Player 1 in computer mode.
What happens when the board fills?
If all 42 spaces fill without either player making a line of four, the round is a draw.
What should I check before every move?
Check whether you can win now, whether the opponent can win next, and which remaining move builds a useful threat.
Does Undo work differently against the computer?
Yes. In computer mode, Undo removes the latest human move and computer reply when both exist. In friend mode it removes one move.
Is the computer unbeatable?
No. It looks ahead for useful moves, but it is a quick practice opponent rather than a perfect game solver.
Are my moves or scores saved?
No. The game runs locally in the current browser tab and the session score resets when the page session ends or the mode changes.
Related tools
- Dice RollerRoll one or more virtual dice with custom sides and a modifier.
- Random Number GeneratorGenerate random numbers in a custom range, with unique, sorted, and copied results.
- Probability CalculatorCalculate P(A or B), P(A and B), complements, and independent-event probability checks.
- Permutation and Combination CalculatorCalculate nPr and nCr for order-matters and order-does-not-matter counting problems.
Keep exploring
If this guide is close but not exact, these links keep you near the same kind of problem.
- Everyday ToolsBrowse the full category for related tools that help with the same job.
- All free toolsSearch the complete Access Free Tools library by task, category, or tool name.
- All tool and utility guidesFind more plain-language examples, logic notes, mistakes, and result explanations.
- Free tool resourcesStart here when you are not sure which tool page fits.
Privacy and session scores
Moves, round results, and session scores stay only in the current browser tab. They are not sent to a game server.
Changing modes resets the session score. Refreshing or closing the tab clears the current round and scores.
