|
|
|
@ -3,7 +3,7 @@ from __future__ import print_function
|
|
|
|
|
from PySide import QtCore, QtGui
|
|
|
|
|
|
|
|
|
|
from player import Player
|
|
|
|
|
from windows import QuestionWindow, EditAnswersWindow, PlayerStartWindow
|
|
|
|
|
from windows import QuestionWindow, EditAnswersWindow, PlayerStartWindow, VictoryWindow
|
|
|
|
|
from gamestate import QuestionAnswers
|
|
|
|
|
|
|
|
|
|
class SeopardyGame(QtGui.QWidget):
|
|
|
|
@ -93,6 +93,8 @@ class SeopardyGame(QtGui.QWidget):
|
|
|
|
|
self._inOtherWindow = True
|
|
|
|
|
x.exec_()
|
|
|
|
|
self._inOtherWindow = False
|
|
|
|
|
elif e.key() == QtCore.Qt.Key_V:
|
|
|
|
|
self.show_victory_window()
|
|
|
|
|
elif e.key() == QtCore.Qt.Key_E:
|
|
|
|
|
if self._inOtherWindow:
|
|
|
|
|
return
|
|
|
|
@ -134,6 +136,12 @@ class SeopardyGame(QtGui.QWidget):
|
|
|
|
|
self.gamestate.set_answers(section, number, newAnswers)
|
|
|
|
|
self._restyle_button(section, number, newAnswers)
|
|
|
|
|
|
|
|
|
|
def show_victory_window(self):
|
|
|
|
|
self._inOtherWindow = True
|
|
|
|
|
victoryWindow = VictoryWindow(self.players, self)
|
|
|
|
|
victoryWindow.exec_()
|
|
|
|
|
self._inOtherWindow = False
|
|
|
|
|
|
|
|
|
|
def go_to_question(self, section, number):
|
|
|
|
|
if self._inOtherWindow:
|
|
|
|
|
return
|
|
|
|
|