server has its own world and has primitiv logic for starting a game
This commit is contained in:
parent
3fa66bc2bf
commit
d9b367dd42
@ -4,4 +4,5 @@ from Classes.Game.World import World
|
|||||||
# send from the server to tell the player the game starts
|
# send from the server to tell the player the game starts
|
||||||
# gives the client its and the opponents stats (not cards!!)
|
# gives the client its and the opponents stats (not cards!!)
|
||||||
def GameStart(world: World):
|
def GameStart(world: World):
|
||||||
|
print("game starts")
|
||||||
pass
|
pass
|
@ -9,6 +9,10 @@ class TCPEventHandler:
|
|||||||
if message["event"] == "login":
|
if message["event"] == "login":
|
||||||
# todo: handle login response here
|
# todo: handle login response here
|
||||||
pass
|
pass
|
||||||
|
elif message["event"] == "startgame":
|
||||||
|
# todo: handle starting the game here
|
||||||
|
print("game starts")
|
||||||
|
pass
|
||||||
|
|
||||||
class UDPEventHandler:
|
class UDPEventHandler:
|
||||||
def __init__(self, socket:socket):
|
def __init__(self, socket:socket):
|
||||||
@ -16,7 +20,7 @@ class UDPEventHandler:
|
|||||||
|
|
||||||
def handleEvents(self, message):
|
def handleEvents(self, message):
|
||||||
if message["event"] == "PlaceCard":
|
if message["event"] == "PlaceCard":
|
||||||
pass
|
pass
|
||||||
elif message["event"] == "MoveCard":
|
elif message["event"] == "MoveCard":
|
||||||
pass
|
pass
|
||||||
elif message["event"] == "RemoveCard":
|
elif message["event"] == "RemoveCard":
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user