added card types
This commit is contained in:
22
Game_Client/Classes/System/Objects/Cards/Card.py
Normal file
22
Game_Client/Classes/System/Objects/Cards/Card.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import pygame
|
||||
|
||||
|
||||
class Card:
|
||||
__name:str
|
||||
__artwork:pygame.image
|
||||
|
||||
def __init__(self, name:str, imagePath:str):
|
||||
|
||||
if name == "":
|
||||
return ValueError.add_note("Card: name cannot be empty")
|
||||
if imagePath == "":
|
||||
return ValueError.add_note("Card: imagePath cannot be empty")
|
||||
|
||||
self.__name = name
|
||||
self.__image = pygame.image.load(imagePath)
|
||||
|
||||
def getName(self) -> str:
|
||||
return self.__name
|
||||
|
||||
def getArtwork(self) -> pygame.image:
|
||||
return self.__image
|
||||
Reference in New Issue
Block a user