main_testing2/wordle_test3b.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 23:34:53 +0000
changeset 475 59e005dcf163
parent 437 d4d4669ad054
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: 437
diff changeset
     2
def urbanmain() = {
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     3
  import M2._
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     5
  assert(score("chess", "caves") == List(Correct, Absent, Absent, Present, Correct))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     6
  assert(score("doses", "slide") == List(Present, Absent, Absent, Present, Present))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     7
  assert(score("chess", "swiss") == List(Absent, Absent, Absent, Correct, Correct))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     8
  assert(score("chess", "eexss") == List(Present, Absent, Absent, Correct, Correct))
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    10
  val urban_p = pool("chess", "caves")
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    12
  assert(aux("chess".toList, "caves".toList, Nil) == List(Correct, Absent, Absent, Absent, Correct))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    13
  assert(aux("chess".toList, "caves".toList, urban_p) == List(Correct, Absent, Absent, Present, Correct))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    14
}