Gomoku
Play freestyle Gomoku locally on a standard 15×15 board with keyboard controls, four-axis win detection, draw detection, restart, and Boss Key.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Black starts. Use the arrow keys to move the highlighted cursor to an empty intersection.
- 2.Press Space or Enter to place a stone, then let White and Black alternate turns on the same device.
- 3.Make five or more contiguous stones in any horizontal, vertical, or diagonal line; use Restart to clear the board or Escape twice for the Boss Key.
About Gomoku
Gomoku is a local two-player implementation of freestyle five in a row. The board contains 15 rows and 15 columns, Black moves first, and players alternate placing Black and White stones on empty intersections. The first player to form a contiguous line of five or more stones horizontally, vertically, or diagonally wins. In freestyle rules, an overline of six or more also counts; this page does not apply Renju opening restrictions or forbidden-move rules.
The highlighted cursor starts at the center intersection. Use the arrow keys to move one intersection at a time, then press Space or Enter to place the current player's stone. Movement clamps at the board edges, and attempting to place on an occupied intersection changes neither the board nor the turn. Pointer users can select any empty intersection directly and then use the Place Stone button, while the visible turn label makes the next player explicit.
Win detection examines four axes through the newest stone: horizontal, vertical, descending diagonal, and ascending diagonal. For each axis, it counts matching stones in both directions and includes the placed stone. A total of five or more ends the round immediately, preserves the final board, announces Black or White as winner, and freezes further placement. Checking through the newest move avoids inventing a winner elsewhere and matches the fact that only one cell changes per legal turn.
The game also has a defined dead state. If all 225 intersections become occupied without either color forming five in a row, the result is a draw and input freezes. Automated tests use a full alternating pattern that contains no qualifying line to exercise this otherwise rare boundary. The game never silently resets a full board, skips an occupied turn, or continues scoring moves after a win or draw.
Restart clears all 225 cells, restores Black as the first player, returns the cursor to the center, resets the move count, and removes the winner or draw message. The shared game shell records a local best result using the move count, where fewer moves is better. That small value is stored only in browser site data and is not a global ranking or proof of competitive skill. No account, opponent matching, chat, server, or network connection is involved.
The Boss Key is available through the common game controls. Press Escape twice quickly to replace the game view with a neutral work-style screen, then repeat the shortcut to restore it. This is a convenience overlay, not a security feature: it does not close the page, remove history, change the operating-system window title, or protect the board from someone with access to the browser. Restart separately clears the active round.
The board is rendered as semantic DOM buttons rather than a canvas. That keeps every intersection directly interactive, allows browser focus indication, and makes keyboard behavior testable without interpreting pixels. Colors use the site's CSS variables and explicit Black and White stone styling. The page does not require audio, camera, microphone, touch gestures, or special hardware. On small screens, the board remains contained within its panel instead of widening the document.
Rules are sourced from public Gomoku references and independently cross-checked for the standard board, Black-first order, empty-intersection placement, four line directions, and freestyle overlines. The executable evidence fixture contains eight rule anchors. A separate nine-move simulation proves a real Black horizontal win while White alternates legal moves on the next row. Additional tests cover every win axis, occupied-cell rejection, cursor bounds, post-win freezing, and a full-board draw.
This version deliberately stops at same-device play. It has no computer opponent, hint engine, timers, takebacks, saved games, opening library, tournament adjudication, Renju fouls, Pente captures, or online rating. Agree with the other player before starting that freestyle rules are in use. For official competition, consult that event's current rulebook, because board size, opening procedure, overline treatment, and forbidden moves can differ between Gomoku variants.
Methodology & sources
Create a 225-cell array for a 15×15 freestyle board, Black first, centered cursor, and zero moves. Clamp arrow movement. Reject occupied cells without advancing the turn. After a placement, count matching stones in both directions along horizontal, vertical, and the two diagonals; five or more sets the winner. If no winner and every cell is occupied, set draw. Freeze moves after win/draw, and rebuild initial state on Restart. Render every intersection as a DOM button with site CSS variables.
Frequently asked questions
- Does a line of six count as a win?
- Yes. This page uses freestyle Gomoku, where five or more contiguous stones wins. It does not apply Renju overline or forbidden-move restrictions.
- Can I play against the computer or online?
- No. This version is for two players sharing one device. It has no AI opponent, matchmaking, chat, saved game, or rating.
- What happens if the board fills without five in a row?
- The game detects the full board as a draw, freezes further moves, and offers Restart for a new round.
Related tools
- 15 PuzzlePlay the classic 15 puzzle free in your browser — slide the numbered tiles into order with your keyboard, no download or sign-up.
- 2048 GamePlay 2048 free in your browser — merge tiles with your arrow keys to reach the 2048 tile, no download or sign-up.
- Dinosaur GamePlay a dinosaur runner game free in your browser — jump obstacles with the space bar, no download and no offline trick needed.
- Fireworks SimulatorPlay a short keyboard-friendly fireworks challenge with visible shots, deterministic scoring, deadlock detection, restart, and Boss Key support.
- Battleships PuzzleLocate a three-ship fleet from row and column totals while keeping every straight ship separated, even diagonally.
- Hashi Bridges PuzzleConnect six numbered islands with non-crossing single or double bridges while matching every clue and forming one network.
Mini Games guides
View all- How to Play the Dinosaur Game in Your Browser
- How to Play 2048: Quick Start Guide for Beginners | Lizely
- How to Play 15 Puzzle in Your Browser (Quick Start)
- Dinosaur Game Strategy: Score Higher Every Run
- Master 2048 Strategy to Reach the 2048 Tile Every Time
- 15 Puzzle Strategy: Move Sequences That Solve the Board Faster
- Dinosaur Game Rules: How to Play the Chrome T-Rex Runner
- 2048 Rules Explained: How to Play and Win
- How to Play the 15 Puzzle: Rules and Winning Tips