added old code, fixed it (mostly), merged some new code to the old code, made it mostly runnable

This commit is contained in:
2024-01-21 23:03:24 +01:00
parent d6ba33874d
commit 5daffa8a8e
192 changed files with 2373 additions and 44 deletions

View File

@@ -0,0 +1,32 @@
import socket
from Classes.Game.Player import Player
from Classes.System.GameManager import GameManager
from Classes.System.World import World
class TCPEventHandler:
__tcpSocket:socket
def __init__(self, socket:socket):
self.__tcpSocket = socket
# handles passing of event data to the right functions
def handleTCPEvents(self, event, gameManager:GameManager, address):
gameManager.getLogger().info(f"incommingevent {event}")
if event["event"] == "placecard":
gameManager.spawnCard(event["card"], event["user"], event["x"], event["y"])
pass
elif event["event"] == "MoveCard":
pass
elif event["event"] == "RemoveCard":
pass
elif event["event"] == "AttackCard":
pass
elif event["event"] == "AttackPlayer":
pass
elif event["event"] == "ActivateEffectCard":
pass
elif event["event"] == "ActivateMonsterCard":
pass
pass