main_testing2/wordle_test6.scala
changeset 435 fda7c39f3b6a
child 437 d4d4669ad054
equal deleted inserted replaced
434:8c5804b2f9d2 435:fda7c39f3b6a
       
     1 
       
     2 import Resit._
       
     3 
       
     4 import io.Source
       
     5 
       
     6 
       
     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")
       
    11 
       
    12 //val urban_wordle_url = """https://nms.kcl.ac.uk/christian.urban/wordle.txt"""
       
    13 //val urban_secrets = get_wordle_list(urban_wordle_url)
       
    14 
       
    15 assert(frequencies(urban_secrets)('y') == 0.9680234350909651)
       
    16 assert(frequencies(urban_secrets)('e') == 0.897286463151403)
       
    17 assert(frequencies(urban_secrets)('z') == 0.9933086648165279)
       
    18