main_testing2/wordle_test2.scala
changeset 475 59e005dcf163
parent 439 97594b9998a8
equal deleted inserted replaced
474:b528d1d3d3c3 475:59e005dcf163
     1 
     1 
     2 import M2._
     2 def urbanmain() = {
       
     3   import M2._
     3 
     4 
     4 
     5 
     5 assert(removeN(List(1,2,3,2,1), 3, 1)  == List(1, 2, 2, 1))
     6   assert(removeN(List(1,2,3,2,1), 3, 1)  == List(1, 2, 2, 1))
     6 assert(removeN(List(1,2,3,2,1), 2, 1)  == List(1, 3, 2, 1))
     7   assert(removeN(List(1,2,3,2,1), 2, 1)  == List(1, 3, 2, 1))
     7 assert(removeN(List(1,2,3,2,1), 1, 1)  == List(2, 3, 2, 1))
     8   assert(removeN(List(1,2,3,2,1), 1, 1)  == List(2, 3, 2, 1))
     8 assert(removeN(List(1,2,3,2,1), 0, 2)  == List(1, 2, 3, 2, 1))
     9   assert(removeN(List(1,2,3,2,1), 0, 2)  == List(1, 2, 3, 2, 1))
     9 assert(removeN(List("a", "b", "b"), "b", 1) == List("a", "b"))
    10   assert(removeN(List("a", "b", "b"), "b", 1) == List("a", "b"))
    10 assert(removeN(List("b", "a", "b", "b"), "b", 2) == List("a", "b"))
    11   assert(removeN(List("b", "a", "b", "b"), "b", 2) == List("a", "b"))
    11 assert(removeN(List("b", "a", "b"), "a", 2) == List("b", "b"))
    12   assert(removeN(List("b", "a", "b"), "a", 2) == List("b", "b"))
    12 
    13 
    13 //assert(removeOne(List(1,2,3,2,1), 3) == List(1, 2, 2, 1))
    14   //assert(removeOne(List(1,2,3,2,1), 3) == List(1, 2, 2, 1))
    14 //assert(removeOne(List(1,2,3,2,1), 2) == List(1, 3, 2, 1))
    15   //assert(removeOne(List(1,2,3,2,1), 2) == List(1, 3, 2, 1))
    15 //assert(removeOne(List(1,2,3,2,1), 1) == List(2, 3, 2, 1))
    16   //assert(removeOne(List(1,2,3,2,1), 1) == List(2, 3, 2, 1))
    16 //assert(removeOne(List(1,2,3,2,1), 0) == List(1, 2, 3, 2, 1))
    17   //assert(removeOne(List(1,2,3,2,1), 0) == List(1, 2, 3, 2, 1))
    17 
    18 }