diff -r 2c96963b2e5c -r c6fe374a5fca progs/knight2.scala --- a/progs/knight2.scala Fri Nov 11 16:44:19 2016 +0000 +++ b/progs/knight2.scala Sat Nov 12 15:20:56 2016 +0000 @@ -26,9 +26,11 @@ // non-circle tours def tour(n: Int)(steps: List[Pos]): List[List[Pos]] = { - if (steps.length == n * n && moves(n)(steps.head).contains(steps.last)) List(steps) + if (steps.length == n * n) // && moves(n)(steps.head).contains(steps.last)) + List(steps) else - (for (x <- moves(n)(steps.head).par; if (!steps.contains(x))) yield tour(n)(x :: steps)).toList.flatten + (for (x <- moves(n)(steps.head).par; + if (!steps.contains(x))) yield tour(n)(x :: steps)).toList.flatten } //val n = 8