How to play Sentry and control the board
Sentry is a strategy game about lines of sight. You and the computer take turns placing sentries on a grid, choosing which direction each one faces. A sentry watches straight ahead until its view is blocked by a wall or by any other sentry, friend or foe, and every enemy caught in that line is removed at once. The catch is that you cannot place on any square an enemy sentry is already watching. Those two rules pull against each other in a way that makes every placement a calculated risk. This guide covers the rules, the controls, the three board sizes, and the thinking that turns an early lead into a comfortable win.

Rules of the game
Players alternate turns. On your turn you place a single sentry on any empty square that is not currently watched by an enemy. After placing, you choose one of four facings: north, east, south, or west. The sentry then watches in that direction along a straight line. Every enemy sentry along that line is captured and removed, but the line stops at the first obstacle it meets, whether that is a wall, a friendly sentry, or the edge of the board.
You may place on a square watched by your own sentries, but you may never place on one watched by the opponent. Squares guarded by the computer are shaded pink so you can see at a glance which parts of the board are off limits. When neither side has a legal move remaining, the game ends and whoever has more sentries still standing on the board wins. A draw is possible when both sides finish with the same count.
Controls and interface
Green squares on the board are the ones you may legally take. Tap or click one to select it. Four direction arrows then appear below the board. Choose an arrow to set the facing, which completes your turn. The status bar above the board shows three numbers: how many sentries you have on the board, how many the computer has, and how many squares are still available to you.
The Ground selector beneath the board offers three sizes. Small gives a five-by-five grid with a few walls scattered across it, Medium uses a six-by-six grid, and Large uses seven-by-seven. Walls appear at random, and their positions change every time you start a new game. Press the New game button to reset the board at whatever size is currently selected.
How sight lines and blocking work
A sentry watches in one direction only. The line extends from its position one square at a time in that direction until something stops it. A wall block is an absolute barrier. A sentry belonging to either side also blocks the line. The critical detail is that a sentry takes every enemy along its line up to the first blocker. If two enemies sit in a row with nothing between them, both are captured, but a friendly sentry in between would stop the line before reaching the second enemy.
Once placed, a sentry keeps watching for the rest of the game. It does not move, rotate, or lose its sight line after capturing. This means every sentry you place is also a permanent denial of the squares it watches, and the accumulation of denied territory is how the game closes down.
Offensive strategy: long lines and captures
The most tempting move is to face a sentry down a long open corridor and sweep multiple enemies off the board at once. When it works, it is devastating, because you gain one sentry while removing several. Long sight lines are especially strong in the opening when the board is mostly empty and there are few blockers to cut the line short.
The danger of a long aggressive line is that your sentry stands at the end of it. The computer can answer by placing a sentry behind yours, facing the opposite direction, and taking your piece in return. Every aggressive placement has a vulnerable flank, and the computer is aware of this tradeoff. The key is to look at the squares behind and beside your chosen position and ask whether the computer has a legal answer from any of them.
Defensive strategy: walls and safe placements
A sentry facing into a wall two squares away captures almost nothing, but it is nearly impossible to punish. The sight line covers only the one square between the sentry and the wall, and the sentry itself stands with its back against a barrier. These safe placements may look passive, but they are how you survive to the end of the game. A sentry that is still standing when the board locks up is worth exactly as much as one that captured three enemies earlier.
Your own sentries block the line just as walls do. If you build a row of your own pieces, each one protects the one behind it. This creates a defensive formation that the computer cannot break through without sacrificing material. Packing sentries together near walls and edges is a reliable way to accumulate safe pieces while the computer overextends across the open center.
Reading the board and counting territory
The scoreboard tells you how many squares you may still legally take. Watch that number after each move. If your available squares drop faster than your sentry count rises, you are being squeezed. The computer is placing sentries that deny your territory without leaving itself vulnerable, and if you do not answer, the game will end with you having fewer pieces on the board.
Pink squares are only denied while the enemy sentry watching them is alive. If you can take out that watcher, the ground opens up again. This is the main reason to look for aggressive captures even in a defensive game. Removing a computer sentry that controls a large area can swing the available square count back in your favor by five or six squares at once.
How the computer plays
The computer evaluates every legal square and all four possible facings for each one. It scores each combination by what it would capture, what it would lose, and how much territory each side would have after the placement. It does not search deeply into future turns, because the branching factor is enormous. Instead it relies on a single-move evaluation that weighs material gain against positional exposure, with a small random element so it does not repeat the same patterns game after game.
Because the evaluation is shallow, you can outplay the computer by thinking one step further. If you see a square where the computer will be forced to answer in a way that opens a follow-up capture for you, take it. The computer will not see the trap until it has already walked into it.
Common mistakes to avoid
The biggest mistake is always facing outward into the open board. Long lines look impressive, but if the computer can answer from behind you on the very next turn, you gain nothing and lose the piece you just placed. Before choosing a facing, look at what is behind the square you selected and ask whether that square is legal for the computer.
Another frequent error is ignoring the available-square count. You can be ahead on the scoreboard by two sentries and still lose, because the computer has more room to place and will overtake you in the final turns. When the free squares start running low, switch to safe placements near walls and corners rather than risky captures.
A third mistake is trying to capture a sentry that is shielded. If a computer sentry has a wall behind it and a friendly sentry in front, there is no way to line up a shot at it. Spending turns trying to crack a defended position wastes time that could be spent building your own safe territory elsewhere.
Difficulty levels and board sizes
The Small board is the best place to learn because the grid is only five squares wide and games end quickly. With fewer total squares, every placement matters more and you can see the whole picture at a glance. The Medium board at six-by-six introduces more open space and more walls, which means longer sight lines and more complex territory fights. The Large board at seven-by-seven is the most demanding. There is room for extended maneuvering, and a single mistake in the midgame can lock you out of an entire section of the board.
Wall density increases slightly with board size. On Small boards, about eight percent of squares are walls. On Large boards, roughly twelve percent are walls. More walls mean more safe corners and more choke points, which rewards the defensive style of play described earlier.
Privacy and how the game runs
The entire game runs in your browser. No moves are sent to a server, no data leaves your device, and there is no account to create. Your best score is stored in local storage on this device only and will not follow you to another machine. Once the page has finished loading, you can disconnect from the internet and the game will continue to work without any change.
