generated from mwc/lab_dice
completed checkpoint 3 by adding the yahtzee goals
At first, I had lots of difficulty trying to get used to OOP. However, I do believe I am starting to understand it. It was not difficult to expand the code since OOP was used. This method of problem solving is more organized than how I would have written a Yahtzee program using my past experience. I would have had to use many more functions and it would be tougher to stay organized and expand as we had to do in this assignment. I like how it was structured in the different files. This made it easy to debug. This method of problem solving might be tougher to get started due to its more complex nature, but the coder will reap the benefits when trying to debug or expand the code.
This commit is contained in:
@@ -36,7 +36,7 @@ class FiveDice:
|
||||
|
||||
dice = FiveDice()
|
||||
|
||||
|
||||
'''
|
||||
successes = 0
|
||||
trials = 1000000
|
||||
for trial in tqdm(range(trials)):
|
||||
@@ -66,5 +66,5 @@ for trial in tqdm(range(trials)):
|
||||
print('four of a kind odds')
|
||||
print(successes/trials)
|
||||
print('_'*80)
|
||||
|
||||
'''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user