fix deprecation warnings
This commit is contained in:
parent
6d7687c33f
commit
ac0fa4e5ff
|
@ -32,7 +32,7 @@ class FilterChallenge extends ChallengeProvider {
|
|||
val r = new scala.util.Random
|
||||
val alphabet = "abcdefghijklmnopqrstuvwxyz"
|
||||
val n = 8
|
||||
val secret = Stream.continually(r.nextInt(alphabet.size)).map(alphabet).take(n).mkString
|
||||
val secret = LazyList.continually(r.nextInt(alphabet.size)).map(alphabet).take(n).mkString
|
||||
val canvas = new BufferedImage(225, 50, BufferedImage.TYPE_INT_RGB)
|
||||
val g = canvas.createGraphics()
|
||||
g.setColor(Color.WHITE)
|
||||
|
|
|
@ -58,7 +58,7 @@ class RainDropsCP extends ChallengeProvider {
|
|||
|
||||
def returnChallenge(): Challenge = {
|
||||
val r = new scala.util.Random
|
||||
val secret = Stream.continually(r.nextInt(alphabet.size)).map(alphabet).take(n).mkString
|
||||
val secret = LazyList.continually(r.nextInt(alphabet.size)).map(alphabet).take(n).mkString
|
||||
val width = 450
|
||||
val height = 100
|
||||
val imgType = BufferedImage.TYPE_INT_RGB
|
||||
|
|
Loading…
Reference in New Issue