--- a/progs/knight.scala Sat Nov 05 17:11:47 2016 +0000
+++ b/progs/knight.scala Sat Nov 05 18:07:21 2016 +0000
@@ -43,7 +43,7 @@
if (steps.length == n * n && moves(n)(steps.head).contains(steps.last))
print_board(n)(steps)
else
- for (x <- moves(n)(steps.head).par; if (!steps.contains(x))) ctour(n)(x :: steps)
+ for (x <- moves(n)(steps.head); if (!steps.contains(x))) ctour(n)(x :: steps)
}
@@ -51,7 +51,7 @@
if (steps.length == n * n && moves(n)(steps.head).contains(steps.last))
print_board(n)(steps)
else
- for (x <- ordered_moves(n)(steps)(steps.head).par; if (!steps.contains(x))) faster_tour(n)(x :: steps)
+ for (x <- ordered_moves(n)(steps)(steps.head); if (!steps.contains(x))) faster_tour(n)(x :: steps)
}
@@ -65,7 +65,6 @@
}
-/*
val n2 = 6
println(s"circle tour: n = $n2")
@@ -74,9 +73,9 @@
ctour(n2)(List((i, j)))
}
}
-*/
+
-val n3 = 9
+val n3 = 8
println(s"fast circle tour: n = $n3")
Try {