main_testing4/knight_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 11 Mar 2023 22:42:09 +0000
changeset 464 73ced118f73d
parent 403 ffce7b61b446
permissions -rw-r--r--
updated to scala 3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
403
ffce7b61b446 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 347
diff changeset
     1
import M4a._
215
438459a8e48b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
216
8c868feb917b updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     3
assert(is_legal(8, Nil, (3, 4)) == true)
8c868feb917b updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     4
assert(is_legal(8, List((4, 1), (1, 0)), (4, 1)) == false)
8c868feb917b updated
Christian Urban <urbanc@in.tum.de>
parents: 215
diff changeset
     5
assert(is_legal(2, Nil, (0, 0)) == true)
215
438459a8e48b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6