示例#1
0
 def move_other_loot(self, wn, o_turt, turt):
     """Moves everything from lootPile to otherStoragePile"""
     while self.lootPile.size() != 0:                        # removes all the cards from the lootpile and puts them into the storage pile
         b = self.lootPile.pop()
         self.otherStoragePile.enqueue(b)
         Display.comp_storage(self, wn, turt)                # displays computer storage pile
     o_turt.clear()
     Display.other_storage_number(self, wn, o_turt, self.otherStoragePile.size())    # displays number of cards in storage
     return self.otherStoragePile
示例#2
0
 def move_other_storage(self, wn, x_turt, o_turt, cs_turt):
     """Moves everything from otherStoragePile to otherPlayingPile"""
     if self.otherPlayingPile.size() == 0:
         while self.otherStoragePile.size() != 0:                # removes all the cards from the storage pile and puts it into the playing hand
             d = self.otherStoragePile.dequeue()
             self.otherPlayingPile.push(d)
         if self.otherStoragePile.size() == 0:
             return self.otherPlayingPile
         else:
             x_turt.clear()
             Display.other_card_number(self, wn, x_turt, self.otherPlayingPile.size())       # updates computer playing pile number
             Display.replace_other_card(self, wn, cs_turt)                                   # moves computer storage to playing pile
             o_turt.clear()
             Display.other_storage_number(self, wn, o_turt, self.otherStoragePile.size())    # updates computer storage pile number
             cs_turt.clear()
             return self.otherPlayingPile