Range (Simon Tatham's Puzzles)

Saved games stay in this browser only.

About the puzzle

Range is played on a grid with numbers in some of its squares. You paint some of the other squares black, and each number tells you how far it can see: counting itself, how many white squares lie in a straight line up, down, left and right before the view is blocked by a black square or the edge of the grid.

The puzzle comes from the Japanese publisher Nikoli, which has called it Kurodoko and Kuromasu, among other names. Jonas Kölker contributed this version to the collection.

Rules

  • Numbered squares are never black.
  • Two black squares never touch side by side (diagonally is fine).
  • All the white squares form one connected area: you can walk from any white square to any other through white squares, moving side by side.
  • Each number equals the count of white squares visible from it in the four straight directions, including its own square once.

Controls

Input Action
Left click paint the square black (repeat: dot, then empty)
Right click mark it with a dot, white for sure (repeat: black, then empty)
Arrow keys move the cursor
Enter / Space act as a left / right click on the cursor's square
Shift+arrow put dots on every square you move through
N / U / R new game / undo / redo

The Preferences in the Game menu can swap the two mouse buttons.

How to solve it

Big numbers see far. A number larger than its row and column can reach once the opposite directions are taken into account forces squares to be white. If a 9 sits where at most ten squares are visible, almost everything in its lines is white.

Small numbers need walls close by. A 2 sees just one other square, so three of its four neighbours are black, or the edge of the grid. Each black square you place then puts dots on its four neighbours.

Count the maximum in each direction. For each number, work out how far it could see in each direction before hitting a black square, a pair of neighbours that would both have to be black, or the edge. If the total of the maximums is just enough, every one of those squares is white.

Keep the white area together. A black square that would cut a group of white squares off from the rest is not allowed. Near corners and edges this often decides where a black square has to go instead.

Dots stop mistakes. Marking white squares with dots keeps the counts honest; a number that already sees enough white squares through dots is finished, and the next square in each line is black.

Sizes and difficulty

The Type menu has 9x6, 12x8, 13x9 and 16x11 grids, which mix odd and even widths and heights because they play out differently. Custom sets any width and height.

Playing here

Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which you can undo to keep going on your own), the Type menu with the sizes, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back with its whole undo history the next time you open the page.

On a touch screen, tap a square to paint it black; turn on the Mark button above the board to put dots instead.

Credits and licence

Range was written by Jonas Kölker for Simon Tatham's Portable Puzzle Collection, which Simon Tatham maintains with code contributed by several other authors and distributes with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.