| author | Christian Urban <christian.urban@kcl.ac.uk> | 
| Wed, 06 Mar 2024 18:20:25 +0000 | |
| changeset 481 | cae100aab278 | 
| parent 472 | fbff6f601370 | 
| permissions | -rw-r--r-- | 
| 432 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 1 | |
| 472 | 2 | def urbanmain() = {
 | 
| 3 | import M2._ | |
| 4 | import io.Source | |
| 432 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 5 | |
| 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 6 | |
| 472 | 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")
 | |
| 432 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 11 | |
| 472 | 12 | //val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt""" | 
| 13 | //val urban_secrets = get_wordle_list(urban_wordle_url) | |
| 432 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 14 | |
| 
87e487ccbd7c
updated wordle testing
 Christian Urban <christian.urban@kcl.ac.uk> parents: diff
changeset | 15 | |
| 472 | 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 | } |