merged broken branches client with master branch and added first statehandling for card placement
This commit is contained in:
@ -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
|
Binary file not shown.
Reference in New Issue
Block a user