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,22 @@
import json
import pygame
from Classes.Game.World import World
from Classes.Game.Player import Player
# event the client sends to let the server know it logged in
def Login(tcpClient):
payload = {
"event":"login",
"username": "player",
"deck": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
}
tcpClient.send(payload)
# server response for login event
def LoginResponse(message:dict):
# checks if the response on the login request is successfull
if message["status"] != "success":
print("login failed")
pass