def initGame(mastersound): ''' Initialize a new model of the game: Starts the intro song returns a tuple a deck a list of minidecks a pile a new playscreen ''' deck = Deck() pile = Pile() minidecks = [] mastersound.stop() mastersound.intro() #Initialize a list of slots for i in range(NUMBEROFMINID): minidecks.append(Minideck(deck.draw_cards(CARDSINMINIDECK))) pile.put(deck.draw_card()) return deck, minidecks, pile, PlayScreen()
def testPile(self): ''' Tests the pile class ''' pile = Pile() pile.put('H5') pile.put('H6') self.assertEqual(pile.topCard(), 'H6')