if you got a clue then prompt for pass fail
parent
45360a6751
commit
84aab7c4da
4
main.go
4
main.go
|
|
@ -113,6 +113,7 @@ func ReviewQ(db DB, user IDU, q IDQ) (string, string, error) {
|
|||
fmt.Printf("\n")
|
||||
fmt.Printf("> %+v\n", question.Tags)
|
||||
var response string
|
||||
gotAClue := false
|
||||
for i := range question.Clues {
|
||||
if i == 0 {
|
||||
fmt.Printf("> /clue for a clue\n")
|
||||
|
|
@ -121,6 +122,7 @@ func ReviewQ(db DB, user IDU, q IDQ) (string, string, error) {
|
|||
if response != "/clue" {
|
||||
break
|
||||
}
|
||||
gotAClue = true
|
||||
fmt.Printf("> %s", question.Clues[i].ToString(db.UserResolution(user)))
|
||||
if i+1 < len(question.Clues) {
|
||||
fmt.Printf(" | /clue for another clue")
|
||||
|
|
@ -130,7 +132,7 @@ func ReviewQ(db DB, user IDU, q IDQ) (string, string, error) {
|
|||
if len(question.Clues) == 0 || response == "/clue" {
|
||||
response = readline()
|
||||
}
|
||||
if len(question.Solution) > 0 && question.Solution[0].ToString(1) == response {
|
||||
if !gotAClue && len(question.Solution) > 0 && question.Solution[0].ToString(1) == response {
|
||||
return response, CMD_PASS, nil
|
||||
}
|
||||
if len(question.Solution) > 0 {
|
||||
|
|
|
|||
|
|
@ -760,4 +760,4 @@ users:
|
|||
- hiragana
|
||||
- katakana
|
||||
cadence: 0s
|
||||
resolution: 100
|
||||
resolution: 50
|
||||
|
|
|
|||
Loading…
Reference in New Issue