main_testing2/wordle_test7.scala
changeset 475 59e005dcf163
parent 463 0315d9983cd0
equal deleted inserted replaced
474:b528d1d3d3c3 475:59e005dcf163
     1 
       
     2 import M2._
       
     3 
       
     4 import io.Source
       
     5 
     1 
     6 
     2 
     7 def urban_get_wordle_list(url: String) : List[String] = {
     3 def urbanmain() = {
     8   Source.fromFile(url)("ISO-8859-1").getLines().toList
     4   import M2._
     9 }
     5 
    10 val urban_secrets = urban_get_wordle_list("wordle.txt")
     6   import io.Source
    11 
     7 
    12 
     8 
    13 //val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""
     9   def urban_get_wordle_list(url: String) : List[String] = {
    14 //val urban_secrets = get_wordle_list(urban_wordle_url)
    10     Source.fromFile(url)("ISO-8859-1").getLines().toList
    15 
    11   }
    16 assert(ranked_evil(urban_secrets, "abbey") == List("whizz"))
    12   val urban_secrets = urban_get_wordle_list("wordle.txt")
    17 assert(ranked_evil(urban_secrets, "afear") == List("buzzy"))
       
    18 assert(ranked_evil(urban_secrets, "zincy") == List("jugum"))
       
    19 assert(ranked_evil(urban_secrets, "zippy") == List("chuff"))
       
    20 
    13 
    21 
    14 
    22 assert(ranked_evil(urban_secrets, "beats") == List("fuzzy"))
    15   //val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""
    23 assert(ranked_evil(urban_secrets, "vitae") == List("fuzzy"))
    16   //val urban_secrets = get_wordle_list(urban_wordle_url)
    24 assert(ranked_evil(urban_secrets, "bento") == List("fuzzy"))
    17 
    25 assert(ranked_evil(urban_secrets, "belts") == List("fuzzy"))
    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"))
       
    22 
       
    23 
       
    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 }