Skip to content

Heyawake Puzzle

Shade exactly one cell in each room while preserving a connected white area and blocking every three-room white corridor.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Move with the arrow keys and press Space to shade a cell; press Enter for an optional white mark.
  2. 2.Place exactly one black cell in each room, never put black cells side by side, and keep all white cells connected.
  3. 3.Break every straight white run before it crosses three rooms; three valid shades complete this fixed board.

About Heyawake Puzzle

Heyawake Puzzle is a three by six room-shading logic game based on Nikoli's published rules. The board is divided into three outlined vertical rooms, and each room carries the clue 1. Shade cells so every room contains exactly its indicated number of black cells. That count is only one part of the solution: black cells may not share an edge, all remaining white cells must stay orthogonally connected, and no uninterrupted horizontal or vertical run of white cells may pass through more than two rooms.

Nikoli provides the primary rule definition, while Puzzle Heyawake independently cross-checks the room, adjacency, connectivity, and room-crossing constraints. The small three-room fixture, its disclosed solution, controls, status display, and score are Lizely implementation choices. The fixed layout makes every keyboard sequence reproducible and keeps the rules visible on a mobile-sized board.

Move the selection with the arrow keys. Press Space to shade or unshade the current cell. Press Enter to place or remove an optional white-cell mark; marks are reasoning aids and do not change validation. Mouse and touch users can click a cell to toggle its black state and use the context menu gesture for a white mark. The score begins at 1,000 and subtracts ten for each actual shade or unshade action.

The disclosed solution shades zero-based cells 1, 9, and 16: the second cell of the top row, the fourth cell of the middle row, and the fifth cell of the bottom row. Each of the three rooms then contains one black cell. No two black cells share a side, all fifteen white cells form one orthogonally connected region, and each row is broken so no straight white corridor crosses all three rooms. Three clean shade actions complete the board for 970 points.

Validation recalculates after every shade. Orthogonally adjacent black cells are an immediate contradiction. A room containing more black cells than its clue is also irreconcilable unless a shade is removed. Disconnected white areas are reported as a contradiction. An underfilled room or a currently overlong white corridor is not treated as an irreversible dead end because another legal shade can still repair it; those constraints prevent completion until they are satisfied.

Automated tests check all three room clues, exact partition size, adjacency rejection, white connectivity, the two-room corridor limit, the empty board's visible three-room corridor, exact clue matching, and the complete three-shade sequence. A separate keyboard simulation deliberately shades two neighboring cells and asserts deadlock detection. This distinguishes a genuinely solved board from one that merely matches the clue totals.

The board uses an accessible CSS grid and site variables for every surface, border, foreground, focus outline, and warning. It requires no canvas, downloaded asset, audio, timer, pointer precision, account, or network call. A completed best score may be kept only in localStorage. Restart clears black cells, white marks, moves, score, and contradictions. Double-press Escape for the shared spreadsheet boss cover and repeat it to resume. For other fixed logic challenges, try Masyu, Shingoki, Hitori, or Tents.

Methodology & sources

The board stores black and marked Sets over 18 cells partitioned into three six-cell rooms. Validation counts black cells per room, scans right and down neighbors for black adjacency, breadth-first traverses orthogonally adjacent white cells, and resets a room-id Set at each black cell while scanning straight runs. Completion requires exact clues, connected white cells, no adjacent black cells, and no run spanning over two rooms. Score is max(0, 1000 − 10×shade actions).

Frequently asked questions

Can black cells touch diagonally?
Yes. Standard Heyawake forbids black cells from sharing an orthogonal edge; diagonal contact alone is allowed.
What does the number in a room mean?
It is the exact number of black cells required inside that outlined room. Every room on this fixture has clue 1.
What is the three-room rule?
A continuous straight horizontal or vertical run of white cells may not cross through more than two rooms.
Do white marks affect the solution?
No. Enter adds a personal note to an unshaded cell; only black-cell placement is validated and scored.

Mini Games guides

View all