22 lines
523 B
Python
22 lines
523 B
Python
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 |