equal
deleted
inserted
replaced
24 |
24 |
25 def tour(n: Int)(steps: List[(Int, Int)]): Unit = { |
25 def tour(n: Int)(steps: List[(Int, Int)]): Unit = { |
26 if (steps.length == n * n && moves(n)(steps.head).contains(steps.last)) |
26 if (steps.length == n * n && moves(n)(steps.head).contains(steps.last)) |
27 print_board(n)(steps) |
27 print_board(n)(steps) |
28 else |
28 else |
29 for (x <- moves(n)(steps.head).par; if (!steps.contains(x))) tour(n)(x :: steps) |
29 for (x <- moves(n)(steps.head); if (!steps.contains(x))) tour(n)(x :: steps) |
30 } |
30 } |
31 |
31 |
32 val n = 6 |
32 val n = 6 |
33 |
33 |
34 println("started") |
34 println("started") |