author | Christian Urban <christian.urban@kcl.ac.uk> |
Thu, 06 Jun 2024 22:18:15 +0100 | |
changeset 490 | 4778fefecd0c |
parent 475 | 59e005dcf163 |
permissions | -rw-r--r-- |
435
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
1 |
|
475 | 2 |
def urbanmain() = { |
3 |
import M2._ |
|
4 |
import io.Source |
|
435
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
5 |
|
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
6 |
|
475 | 7 |
def urban_get_wordle_list(url: String) : List[String] = { |
8 |
Source.fromFile(url)("ISO-8859-1").getLines().toList |
|
9 |
} |
|
10 |
val urban_secrets = urban_get_wordle_list("wordle.txt") |
|
435
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
|
475 | 12 |
//val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt""" |
13 |
//val urban_secrets = get_wordle_list(urban_wordle_url) |
|
435
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
|
fda7c39f3b6a
updated wordle testing
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
|
475 | 16 |
assert(evil(urban_secrets, "stent").length == 1907) |
17 |
assert(evil(urban_secrets, "hexes").length == 2966) |
|
18 |
assert(evil(urban_secrets, "horse").length == 1203) |
|
19 |
assert(evil(urban_secrets, "hoise").length == 971) |
|
20 |
assert(evil(urban_secrets, "house").length == 1228) |
|
21 |
} |