15 Puzzle Example 3

longer game

$ python3 fifteen.py

Let's play fifteen!
Enter a number to move that square.
Assume the zero is the blank square.
Try to get them all in order (0 1 2 3 on top row, etc).
Enter -1 to quit.

---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  9 |  5 |  7 |
---------------------
|  0 | 13 | 10 | 11 |
---------------------
|  8 | 12 | 14 | 15 |
---------------------
Your move? 8
Making move 8...
==============================
---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  9 |  5 |  7 |
---------------------
|  8 | 13 | 10 | 11 |
---------------------
|  0 | 12 | 14 | 15 |
---------------------
Your move? 12
Making move 12...
==============================
---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  9 |  5 |  7 |
---------------------
|  8 | 13 | 10 | 11 |
---------------------
| 12 |  0 | 14 | 15 |
---------------------
Your move? 13
Making move 13...
==============================
---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  9 |  5 |  7 |
---------------------
|  8 |  0 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 9
Making move 9...
==============================
---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  0 |  5 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 5
Making move 5...
==============================
---------------------
|  1 |  2 |  6 |  3 |
---------------------
|  4 |  5 |  0 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 6
Making move 6...
==============================
---------------------
|  1 |  2 |  0 |  3 |
---------------------
|  4 |  5 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 2
Making move 2...
==============================
---------------------
|  1 |  0 |  2 |  3 |
---------------------
|  4 |  5 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 5
Making move 5...
==============================
---------------------
|  1 |  5 |  2 |  3 |
---------------------
|  4 |  0 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 6
Making move 6...
==============================
---------------------
|  1 |  5 |  2 |  3 |
---------------------
|  4 |  6 |  0 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 6
Making move 6...
==============================
---------------------
|  1 |  5 |  2 |  3 |
---------------------
|  4 |  0 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 5
Making move 5...
==============================
---------------------
|  1 |  0 |  2 |  3 |
---------------------
|  4 |  5 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------
Your move? 1
Making move 1...
==============================
Congratulations!
---------------------
|  0 |  1 |  2 |  3 |
---------------------
|  4 |  5 |  6 |  7 |
---------------------
|  8 |  9 | 10 | 11 |
---------------------
| 12 | 13 | 14 | 15 |
---------------------