templates3/knight2.scala
changeset 347 4de31fdc0d67
parent 346 663c2a9108d1
child 348 b5b6ed38c2f2
--- a/templates3/knight2.scala	Sun Nov 01 01:21:31 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Core Part about finding a single tour for a board using the
-// Warnsdorf Rule
-//==============================================================
-
-object CW8b {
-
-
-// !!! Copy any function you need from file knight1.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
-
-
-//(6) Complete the function that calculates a list of onward
-//    moves like in (2) but orders them according to Warnsdorf’s 
-//    rule. That means moves with the fewest legal onward moves 
-//    should come first.
-
-
-//def ordered_moves(dim: Int, path: Path, x: Pos) : List[Pos] = ..
-
-
-//(7) Complete the function that searches for a single *closed* 
-//    tour using the ordered_moves function from (6). This
-//    function will be tested on a 6 x 6 board. 
-
-
-//def first_closed_tour_heuristics(dim: Int, path: Path) : Option[Path] = ...
-
-
-//(8) Same as (7) but searches for *non-closed* tours. This 
-//    version of the function will be called with dimensions of 
-//    up to 30 * 30.
-
-//def first_tour_heuristics(dim: Int, path: Path) : Option[Path] = ...
-
-
-
-}