moved game management into own class serverside

This commit is contained in:
2024-01-07 22:27:43 +01:00
parent d9b367dd42
commit 8f90633b16
14 changed files with 176 additions and 45 deletions

View File

@ -1,4 +1,8 @@
import socket
from Classes.Game.Player import Player
from Classes.System.GameManager import GameManager
from Classes.System.World import World
class TCPEventHandler:
@ -8,13 +12,13 @@ class TCPEventHandler:
self.__tcpSocket = socket
# handles passing of event data to the right functions
def handleTCPEvents(self, event):
def handleTCPEvents(self, event, gameManager:GameManager, address):
pass
class UDPEventHandler:
__udpSocket:socket
def __init__(self, socket:socket):
def __init__(self, socket:socket, gameManager:GameManager):
self.__udpSocket = socket
def handleUDPEvents(self, event):