]> git.armaanb.net Git - lightcards.git/commitdiff
Add __init__ functions to the classes
authorArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 21:46:43 +0000 (16:46 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 21:46:43 +0000 (16:46 -0500)
lightcards/deck.py

index e3ef5c523a3a27d0068c23882be9c541e91aee62..b0822a9705704ad055fe2876186e62be7562d076 100644 (file)
@@ -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):