added tcg game from previous project

This commit is contained in:
2024-02-28 21:09:03 +01:00
parent daf0c2ed20
commit 4ff9591f92
21 changed files with 638 additions and 0 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