Trap the Cat
Place barriers on a compact hex field, anticipate the cat's shortest escape route, and trap it before it reaches the edge.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Move the highlighted target with the arrow keys and press Space or Enter to block an open cell.
- 2.Anticipate the cat's automatic shortest route to the boundary and close both ends of the central corridor.
- 3.Trap the cat before it reaches an edge; select Restart after a win or escape, or press Escape twice for the boss screen.
About Trap the Cat
Trap the Cat is a compact turn-based route-blocking puzzle. A cat begins near the center of a seven by seven hex field and tries to reach any edge. On each turn, choose one open cell to block; the cat then takes one available step along a shortest route toward the boundary. Your goal is to close every escape route before the cat reaches an edge cell. The selected cell moves with the arrow keys, and Space or Enter places a barrier. Mouse and touch users can select a cell directly.
This edition uses a deliberately small, deterministic corridor fixture instead of a random board. Most cells begin blocked, leaving a seven-cell horizontal route through the center. That disclosed shape makes the result reproducible and keeps the round short enough for a keyboard break. The cat starts in the middle. Blocking the left approach makes it move right; blocking the remaining right exit on the next turn traps it. A clean two-turn solution earns 800 points from a starting score of 1,000. Each valid barrier costs 100 points, and invalid attempts on the cat or an already blocked cell do not consume a turn.
The movement model follows the familiar Trap the Cat premise described by the Google Play listing and an independent browser-game explanation: the player blocks one spot, the cat moves toward the edge, reaching the edge loses, and removing every route wins. The exact board, tie-breaking order, and scoring formula are Lizely implementation choices rather than an official standard. Rows use offset hex neighbors, so an interior cell can have six adjacent cells. The browser performs breadth-first searches to measure each candidate step's distance to an edge and chooses the shortest reachable route.
A round has two terminal states. If the cat has no neighbor that can still lead to an edge, it is trapped and the game freezes as a win. If its chosen move lands on the outer row or column, it escapes and the game freezes as a loss. That loss is also the detected deadlock: no later barrier can recover the same round, so Restart is required. Automated tests cover neighbor geometry, edge recognition, invalid blocks, the two-turn completion sequence, and a forced edge escape.
The interface exposes all 49 cells as an accessible grid. Each cell announces its row, column, and whether it contains the cat, is blocked, or remains open. The current keyboard target has a visible site-theme outline. The field uses Lizely CSS variables for surfaces, borders, foregrounds, accents, and muted states; there is no canvas palette or downloaded artwork. After a terminal result, movement and blocking are disabled so the displayed outcome stays stable.
Restart returns the cat, cursor, corridor, score, and turn counter to their initial values. The completed best score may be stored in browser localStorage under a game-specific key. It is not uploaded, associated with an account, or shared with other players. Clearing site data or switching browser profiles can remove it without affecting gameplay. There is no timer, public leaderboard, login requirement, or network opponent.
The shared game shell also provides a boss key. Press Escape twice within 400 milliseconds to cover the puzzle with a simulated operations spreadsheet, then repeat the double press to return to the unchanged board. The cover is visual only and sends no data. Use Trap the Cat as a brief path-planning challenge, not as a measure of intelligence or attention. For other deterministic grid puzzles, try Maze Game, Minesweeper, 15 Puzzle, or Hashi Bridges.
Methodology & sources
The browser models a 7×7 odd-row offset hex grid. After each valid block, breadth-first search computes whether every open neighboring cat step can reach an edge and at what distance. The cat chooses a shortest reachable step; no reachable step is a win, while landing on the outer row or column is a terminal loss. Score is max(0, 1000 − 100×valid turns).
Frequently asked questions
- How does the cat choose its move?
- It evaluates open neighboring hex cells with breadth-first search and takes a step on a shortest reachable route to an edge.
- Is the board random?
- No. This version uses a disclosed fixed seven-cell corridor so the two-turn solution and escape cases are reproducible.
- What is the best score?
- The starting score is 1,000 and each valid barrier costs 100 points, so the clean two-turn solution earns 800.
- What counts as a loss?
- The round is lost and frozen as soon as the cat moves onto any cell in the outer row or column.
Related tools
- Maze GameGuide the marker through a compact winding maze using only the arrow keys, with blocked moves ignored and a score that rewards the shortest route.
- MinesweeperClear a fixed beginner minefield with keyboard-accessible reveal and flag controls while using exact adjacent-mine counts to avoid ten hidden mines.
- 15 PuzzlePlay the classic 15 puzzle free in your browser — slide the numbered tiles into order with your keyboard, no download or sign-up.
- Hashi Bridges PuzzleConnect six numbered islands with non-crossing single or double bridges while matching every clue and forming one network.
- 2048 GamePlay 2048 free in your browser — merge tiles with your arrow keys to reach the 2048 tile, no download or sign-up.
- Battleships PuzzleLocate a three-ship fleet from row and column totals while keeping every straight ship separated, even diagonally.
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