Commit 4fecc9ab authored by Agrigor's avatar Agrigor

New_Game event is now triggered after start, added the solved array to player...

New_Game event is now triggered after start, added the solved array to player class for saving the actual status of each player
parent a9343d84
......@@ -52,6 +52,7 @@ class Player:
def __init__(self):
self.points = 0
self.name = ""
self.solved = [[0 for i in range(5)] for j in range(5)]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -137,6 +138,7 @@ class StartGUI(QDialog):
for i in range(PLAYERS_MAX):
self.players[i].name = namesOfPlayers[i]
self.players[i].points = 0
self.players[i].solved = [[0 for i in range(5)] for j in range(5)]
self.killSocket = False
self.setupPlayersView()
self.UI_Start.close()
......@@ -291,6 +293,7 @@ class MainGUI(QMainWindow):
self.UI_Main.actionChange_Points.triggered.connect(self.changePlayerPoints)
self.UI_Main.actionNew_Game.triggered.connect(self.NewGame)
self.UI_Main.show()
self.UI_Main.actionNew_Game.trigger()
def NewGame(self):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment