templates3/knight3.scala
author Christian Urban <urbanc@in.tum.de>
Tue, 29 Oct 2019 14:12:24 +0000
changeset 281 87b9e3e2c1a7
parent 214 bc131735c940
child 296 12dc251fc47e
permissions -rw-r--r--
updated

// Finding a single tour on a "mega" board
//=========================================


// !!! Copy any function you need from file knight1.scala !!!
// !!! or knight2.scala                                   !!! 
//
// If you need any auxiliary function, feel free to 
// implement it, but do not make any changes to the
// templates below.


type Pos = (Int, Int)    // a position on a chessboard 
type Path = List[Pos]    // a path...a list of positions

//(9) Implement a function that searches for a 
//    you have to be careful to write a tail-recursive version as this 
//    function will be called with dimensions of up to 70 * 70
//    and starting field (0, 0). It has to produce a solution within
//    30 seconds.


//def tour_on_mega_board(dim: Int, path: Path) : Option[Path] = ...