15 Puzzle Example 1

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