Skip to content

Instantly share code, notes, and snippets.

@docmarionum1
Last active December 18, 2017 23:48
Show Gist options
  • Save docmarionum1/ce6c10c75c521cfec36c5fe86e2b6f64 to your computer and use it in GitHub Desktop.
Save docmarionum1/ce6c10c75c521cfec36c5fe86e2b6f64 to your computer and use it in GitHub Desktop.
Codenames Blog
**.bin
.ipynb_checkpoints
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import random
def get_board():
cards = []
with open('../codenames_cards.txt', 'r') as f:
for r in f.readlines():
cards.append(r.lower().strip().replace(' ', '_'))
sample = random.sample(cards, 18)
return {
'positive': sample[:9],
'negative': sample[9:-1],
'assassin': sample[-1]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment