Three words. One find each.

Finding CAT twice should still count as one word. This JavaScript word search game uses registered paths and unique word IDs, so reversed endpoints find the same target and a plausible-looking unlisted string never increases progress.

The completed game contains a fixed 36-cell board with CAT, DOG and HAT. Click a start cell and an end cell to validate one straight path; native cell buttons also support keyboard activation. The counter reaches complete only after all three different targets are found. Cancel removes an unfinished attempt while preserving earlier finds.

Three words. One find each.
Three words. One find each.
Open the full example ↗

Keep the grid and target registry together

Use the original grid:

    1 2 3 4 5 6
1   C A T X X X
2   H X X X X X
3   X A X X X X
4   X X T X X X
5   X X G O D X
6   X X X X X X

The target list is CAT, DOG and HAT. There are 36 cells, not a generated layout. Keep the maintained grid, listed-word registry and developer key separate from the learner copy.

Word ID Word Canonical start → end Letters along that direction
W01 CAT r1c1→r1c3 C, A, T
W02 DOG r5c5→r5c3 D, O, G
W03 HAT r2c1→r4c3 H, A, T

NASA's archived ISTP games page includes listed-word searches with forward and backward orientation. It is explicitly an archive, not evidence of a working current JavaScript word-search tool. Our words, grid and path rules are original. ISTP Puzzles and Games

Derive one straight path from two endpoints

The game compares the row and column distances between your two selected endpoints. A supported path is horizontal, vertical or diagonal at equal row/column steps—one of eight directions. Unequal nonzero absolute differences do not define a supported diagonal.

Walk the grid using unit steps to the endpoint, rejecting out-of-bounds coordinates or a turned path. Compare the full coordinate path and letters to a registered target, allowing endpoint reversal for the same word ID. Only the listed coordinate paths count as target words.

DOG is listed from right to left in row 5. Selecting its endpoints in reverse may match W02, but it must not invent a new GOD target. Likewise, a straight XXX selection is not in the target list and should not increase progress.

Store found words by identity

Maintain a found-ID set. The first valid CAT match adds W01; another CAT selection leaves that set and progress unchanged. Completion requires all three unique target IDs, not three attempts or any last highlighted path.

Store found-cell membership separately from transient selection. If future targets overlap, one cell may belong to several found word IDs; finding another word should not erase an earlier word's membership. This fixed sample does not need a fabricated overlap to demonstrate a find.

The maintained key is a development aid, not a privacy barrier. The packet includes no score, random generator, user-word-list implementation or claimed saved progress.

Play and inspect the result

Select r1c1, then r1c3 to find CAT. Select r5c3, then r5c5 to find the registered DOG path in reverse; the game still reports DOG, not a new GOD target. Select r2c1, then r4c3 for diagonal HAT. Three different word IDs produce 3 of 3 and Complete. Repeating CAT leaves the counter unchanged.

Each cell button carries a row, column and letter label. The selection status names the start before the second click. A diagonal with unequal row and column distances is rejected before any find is added; an unlisted XXX path is rejected even when straight. The cell highlights retain found-word membership separately from the temporary start marker.

Use Cancel selection to abandon only the current start. Reset clears the found set and restores zero of three. These controls use the same endpoint validator regardless of how the button is activated. There is no dragging-only path, random layout, saved progress, or hidden teacher-key promise.

For a development review, test the reverse path and the repeated find before adding another grid. Keep coordinates, letters and word IDs together so changing a display does not silently change the answer registry.

Copy a prompt for this example

Build a complete JavaScript word-search game in one HTML file. Use this original six-by-six board, preserving each row:
CATXXX
HXXXXX
XAXXXX
XXTXXX
XXGODX
XXXXXX

The three targets are W01 CAT from row 1 column 1 to row 1 column 3; W02 DOG from row 5 column 5 to row 5 column 3; and W03 HAT from row 2 column 1 to row 4 column 3. Make every cell a labeled button. A player selects a start and an endpoint, then the game checks the complete straight path. Support rows, columns and diagonals with equal row and column steps. Reject unequal diagonals and paths not belonging to a listed target.

Recognize either endpoint order as the same word ID. Reading DOG in reverse does not create a fourth target called GOD. Count each found ID once, retain its cell highlighting, and show completion only when all three unique targets are found. A repeated CAT selection must leave the count unchanged. Keep found-cell membership separate from the temporary start selection.

Show the current selection, result, words to find and unique-word count. Cancel clears only the unfinished selection; Reset clears all finds and completion. After a rejected path, show that no start remains selected. Let keyboard users activate the same cell buttons and validator. Use a compact readable grid with large targets and controls that fit a phone. This is one fixed board, with its answer paths present in the client code.

When demonstrating path validation, NOS can display this prepared HTML puzzle. Find DOG in reverse, repeat CAT, and ask a reviewer to explain why neither action creates a fourth target.

Keep reading