Don't readd points on visited questions

This commit is contained in:
Sebastian Lohff 2013-11-25 19:26:57 +01:00
parent 7ad21c516b
commit e0de9a4f31
1 changed files with 13 additions and 6 deletions

13
game.py
View File

@ -147,18 +147,25 @@ class SeopardyGame(QtGui.QWidget):
return
self._inOtherWindow = True
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.exec_()
self._inOtherWindow = False
# add points to players
if not wasAnswered:
answers = qwin.get_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)
# restyle the button