This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package CodeBreaker | |
import collection.immutable.List._ | |
import annotation.tailrec | |
class Marker(val secretList: List[String]) { | |
def guess(guessList: List[String]) = { | |
val zipped = guessList zip secretList | |
val possible = zipped.filter{case (a,b) => a != b}.unzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Call(i: Int) { | |
def call ={ | |
var sleep = 100 + scala.util.Random.nextInt(10) | |
Thread.sleep(sleep) | |
println(i) | |
sleep | |
} | |
} | |