equal
  deleted
  inserted
  replaced
  
    
    
     1   | 
     1   | 
     2 import scala.concurrent._  | 
     2 //import scala.concurrent._  | 
     3 import scala.concurrent.duration._  | 
     3 //import scala.concurrent.duration._  | 
     4 import ExecutionContext.Implicits.global  | 
     4 //import ExecutionContext.Implicits.global  | 
     5 import scala.language.postfixOps   | 
     5 //import scala.language.postfixOps   | 
     6   | 
     6   | 
     7 type Pos = (Int, Int)  | 
     7 type Pos = (Int, Int)  | 
     8 type Path = List[Pos]  | 
     8 type Path = List[Pos]  | 
     9   | 
     9   | 
    10 def add_pair_urban(x: Pos)(y: Pos): Pos =   | 
    10 def add_pair_urban(x: Pos)(y: Pos): Pos =   | 
    25   case x::Nil => true  | 
    25   case x::Nil => true  | 
    26   case x::y::p =>   | 
    26   case x::y::p =>   | 
    27     if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false  | 
    27     if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false  | 
    28 }  | 
    28 }  | 
    29   | 
    29   | 
    30 lazy val f1 = Future { | 
    30 //lazy val f1 = Future { | 
    31   | 
    31   | 
    32   val ts8 = CW7c.first_tour_heuristic(8, List((0,0))).get  | 
    32   val ts8 = CW7c.first_tour_heuristic(8, List((0,0))).get  | 
    33   assert(correct_urban(8)(ts8) == true)  | 
    33   assert(correct_urban(8)(ts8) == true)  | 
    34   | 
    34   | 
    35 }  | 
    35 //}  | 
    36   | 
    36   | 
    37 Await.result(f1, 360 second)  | 
    37 //Await.result(f1, 360 second)  | 
    38   | 
    38   | 
    39   | 
    39   | 
    40 lazy val f2 = Future { | 
    40 //lazy val f2 = Future { | 
    41   | 
    41   | 
    42   val ts40 = CW7c.first_tour_heuristic(40, List((0,0))).get  | 
    42   val ts40 = CW7c.first_tour_heuristic(40, List((0,0))).get  | 
    43   assert(correct_urban(40)(ts40) == true)  | 
    43   assert(correct_urban(40)(ts40) == true)  | 
    44   | 
    44   | 
    45 }  | 
    45 //}  | 
    46   | 
    46   | 
    47 Await.result(f2, 360 second)  | 
    47 //Await.result(f2, 360 second)  |