added card types

This commit is contained in:
2023-12-06 12:21:51 +01:00
parent 0b5aef794a
commit 4fbd1c6663
19 changed files with 120 additions and 26 deletions

View 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