Looptastic

While playing around with Dicetastic earlier this week, I started to feel the need to optionally loop the program so that I didn’t have to repeatedly re-execute the command. This is now implemented and the latest and greatest version has been committed to GitHub.

The changes are documented on the Dicetastic page but the shorter version is that if you start Dicetastic with a -l or --loop, it will loop until you attempt to roll 0d0.

As part of this, I have added two methods to the Dicelib library, get_sides and get_count. They are documented, but their usage should be obvious.

Dicetastic: A dice-rolling library with a simple command-line interface

When I started trying to teach myself to program in Python, one of the first applications I wrote (apart from the online and printed exercises I could find) was a simple dice rolling application. For a selected number of dice, it would calculate the rolls and return them as a list.

As time went on I tinkered with this a bit more, separating the guts of the application from the (admittedly simple) terminal interface. I have now cleaned this up a bit and put it on GitHub. Dicetastic consists of a library and a simple program that uses the library.

I’m not convinced that anyone will actually find this useful, but I do know that it isn’t doing anything just sitting on my hard drive.

I will put together a project page on this site for the application (probably tomorrow) but, for now, the code is up and you are welcome to take a look.