forked from an/flokati
modules/quiz: Changed hint timing
This commit is contained in:
parent
4388bc22b8
commit
44f64960b7
|
@ -122,6 +122,13 @@ func quizWaitForAnswer(q quizQuestion) (bool, bool, string, int) {
|
|||
i := 0
|
||||
haveAnswer := false
|
||||
timer := time.Now().Unix()
|
||||
timeHintCh := make(chan bool)
|
||||
go func(chan bool) {
|
||||
for i := 0; i < 4; i++ {
|
||||
time.Sleep(15 * time.Second)
|
||||
timeHintCh <- true
|
||||
}
|
||||
}(timeHintCh)
|
||||
for {
|
||||
select {
|
||||
case m := <-quizAnswerCh:
|
||||
|
@ -150,7 +157,7 @@ func quizWaitForAnswer(q quizQuestion) (bool, bool, string, int) {
|
|||
return false, false, "", 0
|
||||
}
|
||||
break
|
||||
case <-time.After(15 * time.Second):
|
||||
case <-timeHintCh:
|
||||
i++
|
||||
if i > 3 {
|
||||
if haveAnswer {
|
||||
|
|
|
@ -38,7 +38,7 @@ const (
|
|||
RE_ORG_COMM = `<li class="commitment">(.*)</li>`
|
||||
FANS_INT = 1000
|
||||
FLEET_INT = 1000
|
||||
FUNDS_INT = 10000
|
||||
FUNDS_INT = 50000
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue