from cards import * def main(): card1 = Cards('Diamonds',8) card2 = Cards('Hearts',10) card3 = Cards('Spades',"Jack") card4 = Cards('Clubs',"Ace") print("The Blackjack value of the card {0} of {1} is {2}".format(card1.getRank(),card1.getSuit(),card1.value())) print("Should be 8") print("The Blackjack value of the card {0} of {1} is {2}".format(card2.getRank(),card2.getSuit(),card2.value())) print("Should be 10") print("The Blackjack value of the card {0} of {1} is {2}".format(card3.getRank(),card3.getSuit(),card3.value())) print("Should be 10") print("The Blackjack value of the card {0} of {1} is {2}".format(card4.getRank(),card4.getSuit(),card4.value())) print("Should be 1") def main2(): card1 = Cards('Diamonds',"8") card2 = Cards('Hearts',"10") card3 = Cards('Spades',"Jack") card4 = Cards('Clubs',"Ace") win = GraphWin("Cards", 1350,900) card1.draw(win,Point(100,200)) card2.draw(win,Point(300,200)) card3.draw(win,Point(500,200)) card4.draw(win,Point(700,200)) def main3(): deck1 = Deck() print(deck1.getCards()[0]) win = GraphWin("Cards", 1350,900) win.setCoords(0,50,135,0) sep = 10 hei = 10 for card in deck1.getCards(): card.draw(win, Point(sep,hei)) sep += 10 if sep > 130: sep = 10 hei += 10 main1() main2() main3()