Update api/client interface to correctly handle wrong riddle guesses
This commit is contained in:
parent
3886ec483c
commit
42d0539a88
|
@ -46,8 +46,8 @@ class RiddleView:
|
|||
riddle = self.api.get_riddle(riddle_id)
|
||||
print(riddle['question'])
|
||||
guess = input("> ")
|
||||
correct = self.api.guess_riddle(riddle_id, guess)
|
||||
if correct:
|
||||
response = self.api.guess_riddle(riddle_id, guess)
|
||||
if response['correct']:
|
||||
print("Yes!")
|
||||
else:
|
||||
print("Nope, that's not the answer.")
|
||||
|
|
Loading…
Reference in New Issue