From 1770c49d0a584dd22d894eeeba67641164255cf9 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 1 Jan 2018 09:36:27 -0600 Subject: [PATCH] Delete card_trash.py --- player/card/card_trash.py | 43 --------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 player/card/card_trash.py diff --git a/player/card/card_trash.py b/player/card/card_trash.py deleted file mode 100644 index 55833a4..0000000 --- a/player/card/card_trash.py +++ /dev/null @@ -1,43 +0,0 @@ -from card.card import Card - - -class CardTrash(Card): - trashable_type_restriction = None - - def trash_card_get_cost(self): - tc = self.__get_trashable_cards() - self._Card__print_card_list(tc, " Trashable Cards: ") - index = 0 - bonus = 0 - chances = self._Card__owner.get_std_chances() - - while 0 < len(tc) and 0 <= index < len(tc) - 1 and chances > 0: - index = self.__get_card_to_trash() - - if index < 0 or index >= len(tc): - print("Acceptable inputs range from 0 to " + str(len(tc) - 1) + ". 1 chance lost.") - index = 0 - chances -= 1 - else: - print("Player " + str(self._Card__owner.get_player_index()) + " trashing " + tc[index].get_name() + ".") - bonus = tc[index].get_cost() - self._Card__owner.get_hand().transfer_card_by_card(tc[index], self._Card__owner.get_table().get_trash()) - chances = 0 - return bonus - - def trash_card(self): - self.trash_card_get_cost() - - def __get_card_to_trash(self): - return int(input("\nPlease identify the index of the desired card to trash: ")) - - def __get_trashable_cards(self): - result = list() - - for c in self._Card__owner.get_hand().get_supply(): - if c != self: - if self.trashable_type_restriction is None: - result.append(c) - elif c.get_type() in self.trashable_type_restriction: - result.append(c) - return result