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 r = new scala.util.Random
|
||||||
val alphabet = "abcdefghijklmnopqrstuvwxyz"
|
val alphabet = "abcdefghijklmnopqrstuvwxyz"
|
||||||
val n = 8
|
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 canvas = new BufferedImage(225, 50, BufferedImage.TYPE_INT_RGB)
|
||||||
val g = canvas.createGraphics()
|
val g = canvas.createGraphics()
|
||||||
g.setColor(Color.WHITE)
|
g.setColor(Color.WHITE)
|
||||||
|
|
|
@ -58,7 +58,7 @@ class RainDropsCP extends ChallengeProvider {
|
||||||
|
|
||||||
def returnChallenge(): Challenge = {
|
def returnChallenge(): Challenge = {
|
||||||
val r = new scala.util.Random
|
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 width = 450
|
||||||
val height = 100
|
val height = 100
|
||||||
val imgType = BufferedImage.TYPE_INT_RGB
|
val imgType = BufferedImage.TYPE_INT_RGB
|
||||||
|
|
Loading…
Reference in New Issue