equal
deleted
inserted
replaced
21 case x::Nil => true |
21 case x::Nil => true |
22 case x::y::p => |
22 case x::y::p => |
23 if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false |
23 if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false |
24 } |
24 } |
25 |
25 |
|
26 import scala.concurrent._ |
|
27 import scala.concurrent.duration._ |
|
28 import ExecutionContext.Implicits.global |
|
29 import scala.language.postfixOps |
|
30 |
|
31 lazy val f = Future { |
26 |
32 |
27 val ts1_urban = first_tour(6, List((0, 0))).get |
33 val ts1_urban = first_tour(6, List((0, 0))).get |
28 assert(correct_urban(6)(ts1_urban) == true) |
34 assert(correct_urban(6)(ts1_urban) == true) |
29 |
35 |
30 val ts2_urban = first_tour(4, List((0, 0))) |
36 val ts2_urban = first_tour(4, List((0, 0))) |
31 assert(ts2_urban == None) |
37 assert(ts2_urban == None) |
|
38 } |
|
39 |
|
40 Await.result(f, 32 second) |