attempt on fixing placing cards through network

This commit is contained in:
2024-01-21 23:40:56 +01:00
parent 5daffa8a8e
commit 3b7563c5f1
18 changed files with 502 additions and 8 deletions

View File

@ -97,6 +97,7 @@ class GameManager:
},
}
print(f"user {userAddr}")
tcpSocket.send(json.dumps(payload).encode())
except Exception as e:
self.logger.error(f"failed to start game due to error: {e}")
@ -130,7 +131,7 @@ class GameManager:
self.logger.info(f"new length of user dictionary: {len(self.__players)}")
# counts participating players and starts the game if enough have joined
if len(self.__players) == 2:
if len(self.__players) >= 2:
self.logger.info("2 players have join game starts")
self.startGame(socket)