fix deprecation warnings

This commit is contained in:
hrj 2021-04-01 17:02:33 +05:30
parent 6d7687c33f
commit ac0fa4e5ff
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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