In freestyle Gomoku, a line of six stones in a row counts as a win because the official rule is "five or more" contiguous stones, not "exactly five." A player only needs to place stones so that any horizontal, vertical, or diagonal run contains at least five of their color, and a longer run — including a run of six or seven — wins the game on the spot. This is the version implemented in the browser-based Gomoku game, where Black and White alternate on a 15×15 board, the game checks four axes through the newest stone after every legal placement, and the first player to build a run of five or more is announced as the winner. The rule is intentionally generous because it removes the rare but frustrating situation where a player "overplays" a winning line and accidentally turns a win into a non-result; in freestyle, more is always better. Other rule sets exist that treat overlines differently, but for the local game played here — and for most casual play — six in a row is exactly as good as five in a row.

does a line of six count as a win when i play gomoku
does a line of six count as a win when i play gomoku

What "Five or More" Means in Freestyle Gomoku

Freestyle Gomoku is the most common rule set used in casual play, online play, and most smartphone apps. Under freestyle, the winning line is defined as any horizontal, vertical, or diagonal run of five or more contiguous stones belonging to the same player. The phrase "five or more" is what answers the six-in-a-row question: a player who builds a line of six has satisfied the condition, and the round ends immediately.

The reason overlines count is to remove the awkward ambiguity that arises when someone is about to win and then accidentally places a stone that extends a four-in-a-row into a five-or-six. In rules that forbid overlines (most notably Renju for the Black player), that defensive mistake can be punished, but in casual play it tends to feel unfair. Freestyle sidesteps the problem by saying any run of five or more wins, regardless of how long it ends up being.

This is the rule used in the local two-player Gomoku tool on Lizely, where Black moves first, players alternate on a 15×15 board, and a contiguous run of five or more triggers the win announcement and freezes further placement. There is no Renju opening or forbidden-move layer on top of the basic freestyle rule, so what you see is what you get.

How Overlines Are Handled Across Rule Variants

Not every Gomoku variant treats six in a row the same way. The differences are small but matter if you ever play in a tournament or against an opponent who expects a different rule set. The table below summarizes how the most common rule families treat overlines.

Rule setWin conditionTreatment of a line of six
Freestyle GomokuFive or more contiguous stonesCounts as a win
Standard GomokuExactly five contiguous stonesDoes not count; play continues
Renju (Black side)Exactly five; overline forbiddenCounts as a loss for Black
Renju (White side)Five or moreCounts as a win for White
Connect SixExactly six contiguous stonesRequired to win

The local version you play here follows the freestyle row, so the rightmost column for the first row applies: a line of six is a win. If you ever move to a Renju tournament, agree on the rule set in advance, because Renju adds forbidden moves for Black in the opening that have no parallel in freestyle, and a line of six becomes a costly mistake for Black instead of a celebration.

How to Play Gomoku Locally

  1. Open the Gomoku board. Black plays first, and a highlighted cursor sits on the center intersection of the 15×15 grid.
  2. Use the arrow keys to move the cursor one cell at a time in any direction. The cursor clamps at the board edges.
  3. Press Space or Enter to drop a stone of the current player's color on the empty intersection under the cursor. The visible turn label updates so the next player knows whose move it is.
  4. Hand the device to the other player, who repeats the same arrow-and-place sequence for their color. If you would rather not use the keyboard, click any empty intersection with your pointer and use the Place Stone button.
  5. Continue alternating until someone builds five or more contiguous stones in a horizontal, vertical, or diagonal line, or until the board fills with 225 stones and the round is declared a draw.
  6. When the round ends, press Restart to clear the board, return the cursor to the center, restore Black as the first player, and reset the move counter. Press Escape twice quickly if you ever need the Boss Key overlay.

If you are curious about whether you can play against the computer or online instead, see the related guide on playing Gomoku against an AI or online opponent.

What the Game Checks After Every Stone

To decide whether the round has ended, the game runs a quick four-axis check that uses only the intersection that just changed. Because exactly one cell changes per legal turn, scanning through the newest move is both safer and faster than scanning the whole board for a new line.

For the placed stone, the engine looks in four directions — horizontal, vertical, descending diagonal, and ascending diagonal — and counts matching stones in both directions along each axis, including the new stone itself. If the total count for any axis reaches five or higher, the round ends immediately: the board is frozen, the winner label is announced, and any further keypress or click is ignored.

What the engine does not do is invent a win somewhere else on the board. A line of five that already existed before this turn is not retroactively declared; only lines that include the newest stone can end the round. This avoids the strange edge case where a slow scan eventually declares a winner while the player is already moving on to the next move. Attempting to place on an occupied intersection changes neither the board nor the turn, so an accidental keypress cannot hand the win to the opponent.

What Happens When the Board Fills Up

A full 15×15 board contains 225 intersections. If both players play a legal move every turn and neither color ever produces a five-in-a-row run, the board eventually fills completely. At that point the game declares a draw, freezes the input, and surfaces a message inviting you to press Restart.

This draw state is rare in casual play because freestyle rules make it easy to force a win once one side has the initiative, but it is fully supported and the engine exercises it as part of its automated tests. The same Restart shortcut clears the board and starts a fresh round from move zero with Black to move. There is no timeout, no takeback, and no online adjudication — just a local result that you and your opponent agree on before starting the next game.

Quick Rules Reference

For convenience, here is the entire rule set the local game enforces, summarized in plain language:

  • Board: 15 rows by 15 columns, 225 intersections total.
  • Players: two, sharing one device; Black moves first.
  • Placement: stones go only on empty intersections; cursor arrows clamp at the edges.
  • Turn order: strict alternation; placing on an occupied cell does not advance the turn.
  • Win: five or more contiguous stones of the same color on any horizontal, vertical, or diagonal line, including lines of six, seven, or more.
  • Draw: all 225 intersections filled with no qualifying line.
  • End of round: board freezes, winner or draw is announced, Restart clears the state.
  • Limits: no computer opponent, no online opponent, no chat, no saved game, no rating, no takebacks, no timers.

Per a public Gomoku reference on how to play Gomoku, the standard board size, Black-first turn order, and four line directions are confirmed for freestyle play, which is exactly what this local version implements.

If you and the other player agree on freestyle rules before starting, every six-in-a-row you build will count as a win, and the round will end as soon as the engine detects the run through the newest stone.