Skip to content

Instantly share code, notes, and snippets.

@ronfe
Last active September 7, 2018 00:10
Show Gist options
  • Save ronfe/aa9bfd018908b67ff904fb6e0d7ff99e to your computer and use it in GitHub Desktop.
Save ronfe/aa9bfd018908b67ff904fb6e0d7ff99e to your computer and use it in GitHub Desktop.
yahtzee
class Yahtzee():
def keep(self, keeplist):
for i in range(5):
if i not in keeplist:
self.dices[i] = np.random.choice(range(1,7))
def __repr__(self):
return str(self.dices)
def __init__(self):
self.dices = np.random.choice(range(1,7), 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment