attempt on fixing placing cards through network

This commit is contained in:
2024-01-21 23:40:56 +01:00
parent 5daffa8a8e
commit 3b7563c5f1
18 changed files with 502 additions and 8 deletions

View File

@ -3,6 +3,7 @@ from Classes.Game.World import World
from Classes.Game.Cards.Card import Card
from Classes.Game.Player import Player
from Classes.System.Components.InputHandler import InputHandler
from Classes.System.Utils.Path import PathUtil
# send from the server to tell the player the game starts
@ -12,5 +13,5 @@ def GameStart(world: World, handCards:list, inputHandler:InputHandler, owner:Pla
world.setEnemy(opponent)
for card in handCards:
world.AddToPlayerHand(Card(pygame.Vector2(500 + (index + 100), 1050), f"Assets/Cards/{card}/", inputHandler, owner))
world.AddToPlayerHand(Card(pygame.Vector2(500 + (index + 100), 1050), PathUtil.getAbsolutePathTo(f"Assets/Cards/{card}/"), inputHandler, owner))