main_testing2/wordle_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 15 Jan 2023 10:31:30 +0000
changeset 460 39ec5c112312
parent 437 d4d4669ad054
child 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
437
d4d4669ad054 updated import
Christian Urban <christian.urban@kcl.ac.uk>
parents: 435
diff changeset
     2
import M2._
435
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
val urban_secrets = get_wordle_list(urban_wordle_url)
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
assert(urban_secrets.length == 12972)
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
assert(urban_secrets.filter(_.length != 5) == Nil)
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
assert(get_wordle_list(urban_wordle_url ++ "2") == Nil)
fda7c39f3b6a updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11