main_testing2/wordle_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 26 Apr 2024 17:36:41 +0100
changeset 487 efad9725dfd8
parent 475 59e005dcf163
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
  val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     6
  val urban_secrets = get_wordle_list(urban_wordle_url)
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     8
  assert(urban_secrets.length == 12972)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
     9
  assert(urban_secrets.filter(_.length != 5) == Nil)
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    11
  assert(get_wordle_list(urban_wordle_url ++ "2") == Nil)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 437
diff changeset
    12
}