Example #1
0
    def update_top_card(self):
        # Clubs has a black border
        card = self.Client.pile.top_card
        if not card.rank and not card.suit:
            image = CardImage.get_blank_card("Clubs")
            self.top_card_image = CardImage.prepare_for_tkinter(image)
        else:
            rank, suit = (self.Client.pile.top_card.rank,
                         self.Client.pile.top_card.suit)
            self.top_card_image = CardImage.make_card_image(rank, suit)

        self.top_card = Tkinter.Button(self, image=self.top_card_image)
        self.top_card.grid()