| author | Christian Urban <christian.urban@kcl.ac.uk> | 
| Sun, 15 Sep 2024 12:57:59 +0100 | |
| changeset 490 | f70d74fea67f | 
| parent 472 | fbff6f601370 | 
| permissions | -rw-r--r-- | 
| 
432
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
1  | 
|
| 
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
2  | 
|
| 472 | 3  | 
def urbanmain() = {
 | 
4  | 
import M2._  | 
|
5  | 
||
6  | 
import io.Source  | 
|
7  | 
||
8  | 
||
9  | 
  def urban_get_wordle_list(url: String) : List[String] = {
 | 
|
10  | 
    Source.fromFile(url)("ISO-8859-1").getLines().toList
 | 
|
11  | 
}  | 
|
12  | 
  val urban_secrets = urban_get_wordle_list("wordle.txt")
 | 
|
| 
432
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
13  | 
|
| 
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
14  | 
|
| 472 | 15  | 
//val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""  | 
16  | 
//val urban_secrets = get_wordle_list(urban_wordle_url)  | 
|
| 
432
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
17  | 
|
| 472 | 18  | 
  assert(ranked_evil(urban_secrets, "abbey") == List("whizz"))
 | 
19  | 
  assert(ranked_evil(urban_secrets, "afear") == List("buzzy"))
 | 
|
20  | 
  assert(ranked_evil(urban_secrets, "zincy") == List("jugum"))
 | 
|
21  | 
  assert(ranked_evil(urban_secrets, "zippy") == List("chuff"))
 | 
|
| 
432
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
22  | 
|
| 
 
87e487ccbd7c
updated wordle testing
 
Christian Urban <christian.urban@kcl.ac.uk> 
parents:  
diff
changeset
 | 
23  | 
|
| 472 | 24  | 
  assert(ranked_evil(urban_secrets, "beats") == List("fuzzy"))
 | 
25  | 
  assert(ranked_evil(urban_secrets, "vitae") == List("fuzzy"))
 | 
|
26  | 
  assert(ranked_evil(urban_secrets, "bento") == List("fuzzy"))
 | 
|
27  | 
  assert(ranked_evil(urban_secrets, "belts") == List("fuzzy"))
 | 
|
28  | 
}  |