if response == solutions[0] then pass

master
Bel LaPointe 2023-04-07 11:40:44 -06:00
parent e1ca7dd70b
commit 6de6c6aff3
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ 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 {
return response, CMD_PASS, nil
}
if len(question.Solution) > 0 {
fmt.Printf("> Solution:")
for i := range question.Solution {