Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.69 KB

File metadata and controls

67 lines (43 loc) · 1.69 KB

CardSprite

A CardSprite has all attributes of a Card object and also has pygame sprite qualities.

Screenshots

CardSprite

Imports
import pygame
from Card import Card
Usage
aceOfHearts = CardSprite('Ace', 'Hearts', 0, 0, True)
Instance Variables
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
Methods

back