added old code, fixed it (mostly), merged some new code to the old code, made it mostly runnable
This commit is contained in:
46
Client/Classes/Game/Player.py
Normal file
46
Client/Classes/Game/Player.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import pygame
|
||||
|
||||
class Player:
|
||||
__id:int
|
||||
__hp:int
|
||||
__mana:int
|
||||
__name:str
|
||||
__handCards:pygame.sprite.Group
|
||||
|
||||
def __init__(self, hp:int, mana:int, name:str, id:int=0):
|
||||
self.__hp = hp
|
||||
self.__mana = mana
|
||||
self.__name = name
|
||||
self.__id = id
|
||||
|
||||
def setID(self, id:int):
|
||||
self.__id = id
|
||||
|
||||
def getID(self) -> int:
|
||||
return self.__id
|
||||
|
||||
def getName(self) -> str:
|
||||
return self.__name
|
||||
|
||||
def getHP(self) -> int:
|
||||
return self.__hp
|
||||
|
||||
def getMana(self) -> int:
|
||||
return self.__mana
|
||||
|
||||
def adjustHP(self, hp:int) -> int:
|
||||
self.__hp = self.__hp + hp
|
||||
|
||||
def getHand(self) -> pygame.sprite.Group:
|
||||
return self.__handCards
|
||||
|
||||
def AddToHand(self, card) -> pygame.sprite.Group:
|
||||
self.__handCards.add(card)
|
||||
return self.__handCards
|
||||
|
||||
def removeFromHand(self, pos:int) -> pygame.sprite.Group:
|
||||
self.__handCards.remove(pos)
|
||||
return self.__handCards
|
||||
|
||||
def setMana(self, mana:int):
|
||||
self.__mana = mana
|
||||
Reference in New Issue
Block a user