main_marking4/knight2_test6.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 08 Nov 2021 02:29:24 +0000
changeset 411 f55742af79ef
parent 391 0930e4555b60
child 424 daf561a83ba6
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
391
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
import CW9b._
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
assert(ordered_moves(8, List((3,4), (3,2)), (1, 3)) == List((0,1), (0,5), (2,1), (2,5)))
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
assert(ordered_moves(8, List((4,0)), (0,0)) == List((2,1), (1,2)))
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
assert(ordered_moves(8, List((0,4)), (0,0)) == List((1,2), (2,1)))
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
/*
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
import scala.concurrent._
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
import scala.concurrent.duration._
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    12
import ExecutionContext.Implicits.global
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    13
import scala.language.postfixOps 
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    14
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    15
lazy val f = Future {
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    16
}
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    17
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    18
Await.result(f, 120 second)
0930e4555b60 added main4 marking
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    19
*/