# Number Line Maze

> Draw the walls each number asks for, then find your way from the arrow in to the arrow out.

Kind of puzzle: Lines

Web page: https://inkit.games/puzzles/maze

## Origin

Wyatt invented the Number Line Maze for inkit and drew the first ones by hand.

## Credit

- Inventor: @wyatt / inkit
- Source: [@wyatt](https://inkit.games/wyatt)

## Rules

1. A number counts the walls touching it. The outside edge counts too.
   - ✓ Right: 3 walls
   - ✗ Wrong: Not 2 walls
2. Walls never close off a square or form a loop, so there's exactly one way between any two squares.
   - ✓ Right: One way through
   - ✗ Wrong: Squares shut off
3. When the walls are right, walk from the arrow in to the arrow out.

## Worked example: Warm-up

A 4×4 Number Line Maze puzzle, with exactly one solution.

The givens, as inkit's puzzle engine writes them (cells are [row, column] from 0 at the top left):

```json
[{"at":"edge","kind":"door","role":"in","side":"top","cell":[0,3]},{"at":"edge","kind":"door","role":"out","side":"right","cell":[2,3]},{"at":"corner","kind":"count","corner":[0,0],"value":2},{"at":"corner","kind":"count","corner":[0,1],"value":2},{"at":"corner","kind":"count","corner":[0,2],"value":3},{"at":"corner","kind":"count","corner":[0,3],"value":1},{"at":"corner","kind":"count","corner":[0,4],"value":1},{"at":"corner","kind":"count","corner":[1,0],"value":2},{"at":"corner","kind":"count","corner":[1,1],"value":1},{"at":"corner","kind":"count","corner":[1,2],"value":2},{"at":"corner","kind":"count","corner":[1,3],"value":2},{"at":"corner","kind":"count","corner":[1,4],"value":3},{"at":"corner","kind":"count","corner":[2,0],"value":2},{"at":"corner","kind":"count","corner":[2,1],"value":1},{"at":"corner","kind":"count","corner":[2,2],"value":2},{"at":"corner","kind":"count","corner":[2,3],"value":3},{"at":"corner","kind":"count","corner":[2,4],"value":1},{"at":"corner","kind":"count","corner":[3,0],"value":2},{"at":"corner","kind":"count","corner":[3,1],"value":1},{"at":"corner","kind":"count","corner":[3,2],"value":1},{"at":"corner","kind":"count","corner":[3,3],"value":1},{"at":"corner","kind":"count","corner":[3,4],"value":1},{"at":"corner","kind":"count","corner":[4,0],"value":2},{"at":"corner","kind":"count","corner":[4,1],"value":3},{"at":"corner","kind":"count","corner":[4,2],"value":3},{"at":"corner","kind":"count","corner":[4,3],"value":2},{"at":"corner","kind":"count","corner":[4,4],"value":2}]
```

The solution is drawn on the web page: https://inkit.games/puzzles/maze

Play it: https://inkit.games/g/maze-1

## Playing on inkit

Drag along the lines between numbers to draw walls; tap a line to cycle it. Then drag (or use the arrow keys) to walk out.
