main_templates4/knight3.scala
changeset 425 6e990ae2c6a3
parent 397 9755af1d74df
equal deleted inserted replaced
424:3c81352ec565 425:6e990ae2c6a3
    12 
    12 
    13 
    13 
    14 type Pos = (Int, Int)    // a position on a chessboard 
    14 type Pos = (Int, Int)    // a position on a chessboard 
    15 type Path = List[Pos]    // a path...a list of positions
    15 type Path = List[Pos]    // a path...a list of positions
    16 
    16 
    17 //(9) Implement a function that searches for a 
    17 // ADD YOUR CODE BELOW
    18 //    you have to be careful to write a tail-recursive version as this 
    18 //======================
    19 //    function will be called with dimensions of up to 70 * 70
       
    20 //    and starting field (0, 0). It has to produce a solution within
       
    21 //    30 seconds.
       
    22 
    19 
    23 
    20 
       
    21 //(9) 
    24 def tour_on_mega_board(dim: Int, path: Path) : Option[Path] = ???
    22 def tour_on_mega_board(dim: Int, path: Path) : Option[Path] = ???
    25 
    23 
    26 }
    24 }