author | Christian Urban <christian.urban@kcl.ac.uk> |
Fri, 08 Dec 2023 00:54:36 +0000 | |
changeset 481 | e03a0100ec46 |
parent 476 | 7550c816187a |
permissions | -rw-r--r-- |
214 | 1 |
// Finding a single tour on a "mega" board |
2 |
//========================================= |
|
3 |
||
397 | 4 |
object M4c { |
214 | 5 |
|
6 |
// !!! Copy any function you need from file knight1.scala !!! |
|
7 |
// !!! or knight2.scala !!! |
|
8 |
// |
|
9 |
// If you need any auxiliary function, feel free to |
|
10 |
// implement it, but do not make any changes to the |
|
11 |
// templates below. |
|
12 |
||
13 |
||
14 |
type Pos = (Int, Int) // a position on a chessboard |
|
15 |
type Path = List[Pos] // a path...a list of positions |
|
16 |
||
428
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
397
diff
changeset
|
17 |
// ADD YOUR CODE BELOW |
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
397
diff
changeset
|
18 |
//====================== |
214 | 19 |
|
20 |
||
428
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
397
diff
changeset
|
21 |
//(9) |
347 | 22 |
def tour_on_mega_board(dim: Int, path: Path) : Option[Path] = ??? |
214 | 23 |
|
296 | 24 |
} |