merged broken branches client with master branch and added first statehandling for card placement

This commit is contained in:
2024-01-08 20:07:29 +01:00
parent 8f90633b16
commit 677552a617
53 changed files with 344 additions and 224 deletions

View File

@@ -6,6 +6,7 @@ from Classes.Game.Cards.SpellCard import SpellCard
from Classes.Game.Cards.TrapCard import TrapCard
from Classes.System.Components.InputHandler import InputHandler
from Classes.Game.Player import Player
from Classes.Game.Cards.Card import Card
class World():
__boardFields:list
@@ -113,18 +114,8 @@ class World():
label.setText(player.getName())
self.__enemy = player
def spawnMonsterCard(self, asset:str, pos:pygame.Vector2, inputHandler:InputHandler, owner:Player) -> MonsterCard:
card = MonsterCard(pos, asset, inputHandler, owner)
self.__cards.add(card)
return card
def spawnSpellCard(self, asset:str, pos:pygame.Vector2, inputHandler:InputHandler, owner:Player) -> SpellCard:
card = SpellCard(pos, asset, inputHandler, owner)
self.__cards.add(card)
return card
def spawnTrapCard(self, asset:str, pos:pygame.Vector2, inputHandler:InputHandler, owner:Player) -> TrapCard:
card = TrapCard(pos, asset, inputHandler, owner)
def spawnCard(self, asset:str, pos:pygame.Vector2, inputHandler:InputHandler, owner:Player) -> Card:
card = Card(pos, asset, inputHandler, owner)
self.__cards.add(card)
return card
@@ -132,5 +123,5 @@ class World():
for card in cards:
self.__cards.add(card)
def AddToPlayerHand(self, Card):
def AddToPlayerHand(self, Card:Card):
self.__PlayerHandCards.add(Card)