rfaile313 / CrapsWithBettingSystem

An easy Python Craps game I created from scratch with pass line betting
MIT License
31 stars 16 forks source link

"Animate" the dice! #11

Closed rfaile313 closed 5 years ago

rfaile313 commented 6 years ago

This is an easy, but fun upgrade to the current project.

We want to give the user the illusion of dice rolling when they press a key to roll the dice: http://moziru.com/images/dice-clipart-animated-gif-13.gif

How to solve: Look into ascii_dice.py. The dice are stored into an array. How could we iterate through the dice randomly while taking 1-2 seconds to do so before the user sees the result?

Hints: Use the random library already imported to randomly iterate through the different states of the array. import time to access the sleep() method. Roll your new process into a function.

rfaile313 commented 6 years ago

I reverted this merge. I would like to keep the program without external dependencies to keep it newbie-friendly. Let's use the built-in random and time libraries to solve this problem instead of the asciimatics module.

bx-r0 commented 6 years ago

Okay, no worries. I'll give it another go without the module

rfaile313 commented 6 years ago

@AidanFray Thanks!

JeremyBowyer commented 6 years ago

@AidanFray are you still interested in taking a stab at this? If not, I could give it a try.

bx-r0 commented 6 years ago

@JeremyBowyer I'm under a heavy workload atm so I haven't been able to have another go, but by all means, go ahead!

rfaile313 commented 5 years ago

Someone took care of this! Thank you! 🙏