equal
deleted
inserted
replaced
|
1 // Finding a single tour on a "mega" board |
|
2 //========================================= |
|
3 |
|
4 |
|
5 // !!! Copy any function you need from file knight1.scala !!! |
|
6 // !!! or knight2.scala !!! |
|
7 // |
|
8 // If you need any auxiliary function, feel free to |
|
9 // implement it, but do not make any changes to the |
|
10 // templates below. |
|
11 |
|
12 |
|
13 type Pos = (Int, Int) // a position on a chessboard |
|
14 type Path = List[Pos] // a path...a list of positions |
|
15 |
|
16 //(9) Implement a function that searches for a |
|
17 // you have to be careful to write a tail-recursive version as this |
|
18 // function will be called with dimensions of up to 70 * 70 |
|
19 // and starting field (0, 0). It has to produce a solution within |
|
20 // 30 seconds. |
|
21 |
|
22 |
|
23 //def tour_on_mega_board(dim: Int, path: Path) : Option[Path] = ... |
|
24 |