Deal cards for FreeCell: Difference between revisions
Content deleted Content added
Line 487:
<lang python>from sys import argv
def randomGenerator(seed=1):
max_int32 = (1 << 31) - 1
def deal(seed):
nc = 52
cards = range(nc - 1, -1, -1)
rnd =
for i, r in
j = (nc - 1) -
cards[i], cards[j] = cards[j], cards[i]
return cards
Line 508 ⟶ 506:
def show(cards):
l = ["A23456789TJQK"[c / 4] + "CDHS"[c % 4] for c in cards]
for i in
print " ", " ".join(l[i : i+8])
|