Create a gist now

Instantly share code, notes, and snippets.

@lettergram /game.py
Last active Oct 25, 2015

Run through game simulation
# Run through game
def game(count):
deck = []
origDeck = []
ans = 0
# Generate deck and copy
for j in range(1, count + 1):
deck.append(j)
origDeck.append(j)
# Run through one round
deck = round(deck)
# Loop through until deck is life first
while deck != origDeck:
deck = round(deck)
ans += 1
return ans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment