Don't readd points on visited questions
This commit is contained in:
parent
7ad21c516b
commit
e0de9a4f31
13
game.py
13
game.py
|
@ -147,18 +147,25 @@ class SeopardyGame(QtGui.QWidget):
|
||||||
return
|
return
|
||||||
self._inOtherWindow = True
|
self._inOtherWindow = True
|
||||||
answers = self.gamestate.get_answers(section, number)
|
answers = self.gamestate.get_answers(section, number)
|
||||||
|
wasAnswered = (answers is not None and answers.is_answered())
|
||||||
|
|
||||||
qwin = QuestionWindow(self.players, section, number, self.questions.get_question(section, number), answers, self)
|
question = self.questions.get_question(section, number)
|
||||||
|
if question["Double-Jeopardy"]:
|
||||||
|
print("maunz")
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
qwin = QuestionWindow(self.players, section, number, question, answers, self)
|
||||||
qwin.showFullScreen()
|
qwin.showFullScreen()
|
||||||
qwin.exec_()
|
qwin.exec_()
|
||||||
|
|
||||||
self._inOtherWindow = False
|
self._inOtherWindow = False
|
||||||
|
|
||||||
|
# add points to players
|
||||||
|
if not wasAnswered:
|
||||||
answers = qwin.get_answers()
|
answers = qwin.get_answers()
|
||||||
self.gamestate.set_answers(section, number, answers)
|
self.gamestate.set_answers(section, number, answers)
|
||||||
|
|
||||||
# add points to players
|
|
||||||
# FIXME: Note that we cannot add points when revisiting a question
|
|
||||||
self._set_player_points(answers)
|
self._set_player_points(answers)
|
||||||
|
|
||||||
# restyle the button
|
# restyle the button
|
||||||
|
|
Loading…
Reference in New Issue