Last active
September 7, 2018 00:10
-
-
Save ronfe/aa9bfd018908b67ff904fb6e0d7ff99e to your computer and use it in GitHub Desktop.
yahtzee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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