You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
954 B

package main
import (
"../lib"
"./correct"
"./student"
)
type node struct {
big, little string
}
func main() {
table := []node{}
table = append(table,
node{"aaaaaaa", "a"},
node{"qwerty", "t"},
node{"a", "b"},
)
for i := 0; i < 10; i++ {
l := lib.RandIntBetween(5, 30)
big := lib.RandStr(l, "qwertyuiopasdfghjklzxcvbnm")
start := lib.RandIntBetween(0, l-1)
end := lib.RandIntBetween(start+1, l-1)
little := big[start:end]
value := node{
big: big,
little: little,
}
table = append(table, value)
}
for i := 0; i < 10; i++ {
big := lib.RandStr(lib.RandIntBetween(5, 30), "qwertyuiopasdfghjklzxcvbnm")
little := lib.RandStr(lib.RandIntBetween(1, 29), "qwertyuiopasdfghjklzxcvbnm")
value := node{
big: big,
little: little,
}
table = append(table, value)
}
for _, arg := range table {
lib.Challenge("DoppelGanger", student.DoppelGanger, correct.DoppelGanger, arg.big, arg.little)
}
}