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

@ -7,13 +7,21 @@ class Player:
__mana:int
__name:str
__handCards:list
def __init__(self, name:str, hp:int=1000, mana:int=0):
__deck:list
def __init__(self, name:str, deck:list, hp:int=1000, mana:int=0):
self.__hp = hp
self.__name = name
self.__handCards = []
self.__deck = deck
self.__id = random.randint(3, 99999)
def shuffleDeck(self):
self.__deck = random.shuffle(self.__deck)
def getDeck(self) -> list:
return self.__deck
def getName(self) -> str:
return self.__name
@ -40,6 +48,9 @@ class Player:
self.__handCards.append(card)
return self.__handCards
def setHand(self, hand:list):
self.__handCards = hand
def removeFromHand(self, pos:int) -> list:
self.__handCards.remove(pos)
return self.__handCards