generated from mwc/lab_dice
I enjoyed this style of problem solving, but it took me a while to figure out the small straight. I kept thinking that I had it but then I realized with testing and playing the game that I had forgotten about if the die had duplicates. Originally 1,1,2,3,4 was not detecting a straight. Then I thought checking in reverse would help this, but I forgot about duplicates in the middle (1,2,3,3,4). Ultimately I had to add some code to remove any duplicates from the list and then it finally worked. I did find this problem solving to be easier to code once I found the problem, but sometimes the problem (like with the example above) was not always apparent. I spent more time thinking about how to solve the problem in this topic compared to other topics, but less time debugging the actual code than in previous units. I think I am becoming more familiar with the coding and am starting to be able to use it to solve new problems. |
||
---|---|---|
.commit_template | ||
.gitignore | ||
dice_stats.py | ||
die.py | ||
play.py | ||
poetry.lock | ||
pyproject.toml | ||
testing.py | ||
yahtzee.py | ||
yahtzee_goals.py |