added comments to Card.py

This commit is contained in:
2026-02-10 18:49:34 -05:00
parent 86c29cce1b
commit 90f878e961
2 changed files with 5 additions and 2 deletions

View File

@@ -22,10 +22,10 @@ class Card:
#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
else:
return NotImplemented
#Added for project 2: Created an "__add__" meathod to allow adding Cards together.

View File

@@ -1,3 +1,6 @@
"""
Reo
"""
from __future__ import annotations
from Card import Card