From: Armaan Bhojwani Date: Sun, 31 Jan 2021 21:46:43 +0000 (-0500) Subject: Add __init__ functions to the classes X-Git-Tag: v0.4.0~16 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=9d90fd0a21d9d1e25368284c137053d105dda8e7 Add __init__ functions to the classes --- diff --git a/lightcards/deck.py b/lightcards/deck.py index e3ef5c5..b0822a9 100644 --- a/lightcards/deck.py +++ b/lightcards/deck.py @@ -3,7 +3,9 @@ class Card(list): """Card extends the list class, and adds ability to star them.""" - starred = False + def __init__(self, inp): + super().__init__(inp) + self.starred = False def unStar(self): self.starred = False @@ -29,8 +31,9 @@ class Card(list): class Status(): """The status class keeps track of where in the deck the user is""" - index = 0 - side = 0 + def __init__(self): + self.index = 0 + self.side = 0 def forward(self, stack): if not self.index == len(stack):