Tents Puzzle
Pair four trees with four tents while matching every row and column clue and keeping all tents apart, including diagonally.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Use the arrow keys to select a non-tree cell and press Space to place or remove a tent.
- 2.Match each tree to one orthogonally adjacent tent, keep tents from touching even diagonally, and follow the live row and column clues.
- 3.Press Enter for optional grass notes, correct any contradiction, and place all four valid tents to complete the board.
About Tents Puzzle
Tents Puzzle is a five by five Tents and Trees logic board. Four tree cells are fixed in place, and four tents must be added to the remaining cells. A correct result satisfies four constraints at the same time: there are as many tents as trees, every tent can be matched one-to-one with an orthogonally adjacent tree, no two tents touch in any of the eight surrounding directions, and each row and column contains exactly the number of tents shown by its edge clue.
Those rules follow the maintained Tents documentation in Simon Tatham's Portable Puzzle Collection and an independent GridPuzzle rules guide. Orthogonal means sharing a top, bottom, left, or right edge; diagonal contact does not create a tree-and-tent pair. A tent may be beside more than one tree in some standard puzzles, so validation cannot simply count nearby trees. This implementation runs a bipartite matching check to prove that every placed tent can be assigned to a distinct tree.
Move the cursor with the arrow keys and press Space to place or remove a tent. Press Enter on an empty non-tree cell to add or remove a grass note, which records that you believe the square cannot contain a tent. Grass is only a reasoning aid and does not affect validation. Mouse and touch users can click an available cell to toggle a tent. Tree cells are immutable, and neither tent nor grass actions consume a move when attempted on a tree.
The current tent count and number of matchable tents appear above the board. Every row and column also shows current count versus clue. The fixed solution places tents at cells 1, 8, 15, and 22 in zero-based board order. Its row totals are 1, 1, 0, 1, 1 and its column totals are 1, 1, 1, 1, 0. All four tents are separated, each has an orthogonally adjacent tree, and a one-to-one assignment covers all four trees. Four placements complete the board for 960 points.
The browser recalculates the whole rule set after every tent change. It detects horizontal, vertical, and diagonal tent contact; any row or column above its clue; a tent with no possible neighboring tree; multiple tents competing for too few trees; a tent placed on a tree; and more tents than the four-tree inventory. A contradiction remains editable rather than becoming an irreversible loss: remove the conflicting tent and continue. Completion freezes the board until Restart. Automated tests cover orthogonal versus diagonal pairing, both types of tent contact, exact edge clues, unique tree and solution cells, matching, deadlock, and the complete four-tent keyboard sequence.
Every board cell announces row, column, and tree, tent, grass, or empty state. The current cursor has a visible outline. Tree and tent characters are text rather than downloaded artwork, and all surfaces, lines, accents, foregrounds, and warnings use site CSS variables. No canvas, sound, timer, hardware permission, random service, or pointer precision is required. Keyboard play is the primary path and the board stays within a narrow mobile viewport.
The score begins at 1,000 and subtracts ten for each tent or grass action. Optional notes can make reasoning clearer but lower the result, while a clean four-placement solve earns 960. A completed best may be stored only in localStorage. Restart clears tents, grass, moves, score, and contradictions. Press Escape twice within 400 milliseconds for the shared simulated-spreadsheet boss cover, and repeat it to return. Use the puzzle as a short deduction break, not a clinical attention test. For other fixed logic boards, try Numberlink, Hashi Bridges, Hitori, or Pipes.
Methodology & sources
A fixed 5×5 cell table stores four tree indices, row clues, column clues, and player tent/grass Sets. Validation checks all eight neighbors for tent contact, counts every row and column, and runs augmenting-path bipartite matching from tents to orthogonally adjacent trees. Completion requires four matched tents and exact clues with no contradiction. Score is max(0, 1000 − 10×actions).
Frequently asked questions
- Can tents touch diagonally?
- No. Two tents may not share an edge or a corner, so all eight surrounding cells must be tent-free.
- Can a tree pair with a diagonal tent?
- No. A matched tent must be immediately above, below, left, or right of its tree.
- What do the edge numbers mean?
- Each number is the exact count of tents required in that row or column. The board shows current count versus clue.
- What does a grass mark do?
- It is an optional note for a cell you believe cannot hold a tent. It does not change the validation rules.
Related tools
- Numberlink PuzzleConnect two pairs of matching numbers with continuous orthogonal paths while avoiding reused cells, overlaps, branches, and wrong endpoints.
- Hashi Bridges PuzzleConnect six numbered islands with non-crossing single or double bridges while matching every clue and forming one network.
- Hitori PuzzleShade repeated numbers from a five by five grid while keeping black cells apart and every remaining white cell connected.
- Pipes PuzzleRotate nine fixed pipe tiles until every opening matches a neighbor and all tiles form one connected network without a closed loop.
- 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.
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