MCPcopy Index your code
hub / github.com/geekcomputers/Python / shuffle

Method shuffle

BlackJack_game/blackjack_simulate.py:91–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 self.cards.append(card)
90
91 def shuffle(self):
92 for _ in range(self.num):
93 for index in range(len(self.cards)):
94 i = random.randint(0, 51)
95 self.cards[index], self.cards[i] = self.cards[i], self.cards[index]
96
97 def rebuilt(self):
98 self.cards.clear()

Callers 1

initial_gameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected