added old code, fixed it (mostly), merged some new code to the old code, made it mostly runnable
This commit is contained in:
43
New_Client/Classes/Game/Player.py
Normal file
43
New_Client/Classes/Game/Player.py
Normal file
@ -0,0 +1,43 @@
|
||||
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):
|
||||
self.__hp = hp
|
||||
self.__mana = mana
|
||||
self.__name = name
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user