# Chapter 31: Towers Puzzle Game

You have a square grid. On each square of the grid you can build a tower, with its height ranging from 1 to the size of the grid. Around the edge of the grid are some numeric clues.

Your task is to build a tower on every square, in such a way that:

• Each row contains every possible height of tower once
• Each column contains every possible height of tower once
• Each numeric clue describes the number of towers that can be seen if you look into the square from that direction, assuming that shorter towers are hidden behind taller ones. For example, in a 5×5 grid, a clue marked ‘5’ indicates that the five tower heights must appear in increasing order (otherwise you would not be able to see all five towers), whereas a clue marked ‘1’ indicates that the tallest tower (the one marked 5) must come first.

In harder or larger puzzles, some towers will be specified for you as well as the clues round the edge, and some edge clues may be missing.

This puzzle appears on the web under various names, particularly ‘Skyscrapers’, but I don't know who first invented it.

## 31.1 Towers controls

Towers shares much of its control system with Solo, Unequal and Keen.

To play Towers, simply click the mouse in any empty square and then type a digit on the keyboard to fill that square with a tower of the given height. If you make a mistake, click the mouse in the incorrect square and press Space to clear it again (or use the Undo feature).

If you right-click in a square and then type a number, that number will be entered in the square as a ‘pencil mark’. You can have pencil marks for multiple numbers in the same square. A square containing a tower cannot also contain pencil marks.

The game pays no attention to pencil marks, so exactly what you use them for is up to you: you can use them as reminders that a particular square needs to be re-examined once you know more about a particular number, or you can use them as lists of the possible numbers in a given square, or anything else you feel like.

To erase a single pencil mark, right-click in the square and type the same number again.

All pencil marks in a square are erased when you left-click and type a number, or when you left-click and press space. Right-clicking and pressing space will also erase pencil marks.

As for Solo, the cursor keys can be used in conjunction with the digit keys to set numbers or pencil marks. Use the cursor keys to move a highlight around the grid, and type a digit to enter it in the highlighted square. Pressing return toggles the highlight into a mode in which you can enter or remove pencil marks.

Pressing M will fill in a full set of pencil marks in every square that does not have a main digit in it.

Left-clicking a clue will mark it as done (grey it out), or unmark it if it is already marked. Holding Control or Shift and pressing an arrow key likewise marks any clue in the given direction.

(All the actions described in section 2.1 are also available.)

## 31.2 Towers parameters

These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.

Grid size
Specifies the size of the grid. Lower limit is 3; upper limit is 9 (because the user interface would become more difficult with ‘digits’ bigger than 9!).
Difficulty
Controls the difficulty of the generated puzzle. At Unreasonable level, some backtracking will be required, but the solution should still be unique. The remaining levels require increasingly complex reasoning to avoid having to backtrack.

## 31.3 Towers user preferences

On platforms that support user preferences, the ‘Preferences’ option on the ‘Game’ menu will let you configure the style of the game display. If you don't like the three-dimensional mode, selecting ‘2D’ will switch to a simpler display style in which towers are shown by just writing their height in the square.

[Simon Tatham's Portable Puzzle Collection, version 20230828.67496e7]