added old code, fixed it (mostly), merged some new code to the old code, made it mostly runnable

This commit is contained in:
2024-01-21 23:03:24 +01:00
parent d6ba33874d
commit 5daffa8a8e
192 changed files with 2373 additions and 44 deletions

View 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