main_testing2/wordle_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 23:34:53 +0000
changeset 475 59e005dcf163
parent 439 97594b9998a8
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     2
def urbanmain() = {
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     3
  import M2._
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     6
  assert(removeN(List(1,2,3,2,1), 3, 1)  == List(1, 2, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     7
  assert(removeN(List(1,2,3,2,1), 2, 1)  == List(1, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     8
  assert(removeN(List(1,2,3,2,1), 1, 1)  == List(2, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
     9
  assert(removeN(List(1,2,3,2,1), 0, 2)  == List(1, 2, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    10
  assert(removeN(List("a", "b", "b"), "b", 1) == List("a", "b"))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    11
  assert(removeN(List("b", "a", "b", "b"), "b", 2) == List("a", "b"))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    12
  assert(removeN(List("b", "a", "b"), "a", 2) == List("b", "b"))
439
97594b9998a8 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    13
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    14
  //assert(removeOne(List(1,2,3,2,1), 3) == List(1, 2, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    15
  //assert(removeOne(List(1,2,3,2,1), 2) == List(1, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    16
  //assert(removeOne(List(1,2,3,2,1), 1) == List(2, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    17
  //assert(removeOne(List(1,2,3,2,1), 0) == List(1, 2, 3, 2, 1))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 439
diff changeset
    18
}