Restore Project 1 to original state
This commit is contained in:
@@ -20,12 +20,3 @@ class Card:
|
|||||||
return f"{self._value} of {self._suit}"
|
return f"{self._value} of {self._suit}"
|
||||||
|
|
||||||
#Returns a string representation of the card in the format "Value of Suit".
|
#Returns a string representation of the card in the format "Value of Suit".
|
||||||
|
|
||||||
def __add__(self, other) -> int:
|
|
||||||
#Adding 2 cards together
|
|
||||||
if isinstance(other, Card):
|
|
||||||
return self.value + other.value
|
|
||||||
elif isinstance(other, int):
|
|
||||||
#allows adding a card to an int
|
|
||||||
return self.value + other
|
|
||||||
#Added for project 2: Created an "__add__" meathod to allow adding Cards together.
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import random
|
import random
|
||||||
from Card import Card
|
from Card import Card
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Defines the deck of cards used in the Solitaire game. Contains methods to shuffle the deck, deal cards, and check the number of remaining cards.
|
Defines the deck of cards used in the Solitaire game. Contains methods to shuffle the deck, deal cards, and check the number of remaining cards.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user