558 B
558 B
Rush
Quick and dirty solver for Rush Hour sliding block puzzles.
The game board is modeled as an array of integers with indices:
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
18 19 20 21 22 23
24 25 26 27 28 29
30 31 32 33 34 35
Cars are assigned different integers.
1 1 1 2 3 4
5 6 6 2 3 4
5 0 7 7 3 4
8 8 9 0 0 0
0 10 9 11 11 0
0 10 12 12 13 13
Running the solver
Requirements: Java 8, Maven 3
mvn clean compile
mvn exec:java