fixes import and added docstring

This commit is contained in:
2025-10-28 21:04:15 +01:00
parent f41c759814
commit 2364b6bbca
2 changed files with 2 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ class Card:
self.value = int(rank) self.value = int(rank)
def __str__(self) -> str: def __str__(self) -> str:
"""Returns the rank and suit of the card."""
return self.rank + " of " + self.suit return self.rank + " of " + self.suit
def get_value(self) -> int: def get_value(self) -> int:

View File

@@ -1,5 +1,5 @@
import random import random
from card import Card from pyjack.card import Card
SUITS = ["hearts", "diamonds", "clubs", "spades"] SUITS = ["hearts", "diamonds", "clubs", "spades"]
RANKS = list(range(2, 11)) + ["J", "Q", "K", "A"] RANKS = list(range(2, 11)) + ["J", "Q", "K", "A"]