Add config method

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
This commit is contained in:
Rahul Rudragoudar
2021-03-02 21:32:45 +05:30
parent 600c7c5e8f
commit c00680f631
7 changed files with 26 additions and 1 deletions

View File

@@ -10,6 +10,11 @@ import lc.captchas.interfaces.Challenge
class FilterChallenge extends ChallengeProvider {
def getId = "FilterChallenge"
def configure(config: String): Unit = {
// TODO: add custom config
}
def returnChallenge(): Challenge = {
val filterTypes = List(new FilterType1, new FilterType2)
val r = new scala.util.Random

View File

@@ -23,6 +23,10 @@ class LabelCaptcha extends ChallengeProvider {
def getId = "LabelCaptcha"
def configure(config: String): Unit = {
// TODO: add custom config
}
def returnChallenge(): Challenge =
synchronized {
val r = scala.util.Random.nextInt(knownFiles.length)

View File

@@ -31,6 +31,10 @@ class RainDropsCP extends ChallengeProvider {
def getId = "FilterChallenge"
def configure(config: String): Unit = {
// TODO: add custom config
}
private def extendDrops(drops: Array[Drop], steps: Int, xOffset: Int) = {
drops.map(d => {
val nd = new Drop()