A CardSprite has all attributes of a Card object and also has pygame sprite qualities.
import pygame
from Card import CardaceOfHearts = CardSprite('Ace', 'Hearts', 0, 0, True)| Name | Data Type | Description |
|---|---|---|
_images |
string[] | images for the front and back the card |
_flipped |
bool | keeps track of whether the card is flipped or not |
_cardImage |
Surface | holds the image that will be loaded into the pygame Sprite |
_cardSprite |
Sprite | the pygame sprite for the CardSprite object |
_rect |
Rect | stores rectangular coordinates of the Sprite |