import json
import pygame
from Classes.System.Network.TCPClient import TCPClient
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: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:json):
    # checks if the response on the login request is successfull
    if message["status"] != "success":
        print("login failed")