| author | Christian Urban <christian.urban@kcl.ac.uk> | 
| Mon, 06 Nov 2023 21:49:55 +0000 | |
| changeset 477 | 2403c931a32f | 
| 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  | 
}  |