Sunday, December 9, 2012

The Clock is Ticking

Last time, I wrote that the "All Statistics" window was nearly complete, and that I was working on the clock. Like the All Stats window, the clock is more complex than you'd expect. It needs to pause when Solitaire Till Dawn is not the frontmost application, resume when you come back to the game, and stop when the game is won. It needs to save the current time when you quit, and restore it when you open Solitaire Till Dawn again. It needs to know whether you want the clock to be running at all; and when you change your mind and turn it on, it needs to wait until you start a new game before it begins keeping time: no fair starting the clock from zero in the middle of your current game!

And of course, it needs to display and update correctly; and statistics for the times of won games need to be harvested and saved and shown in the All Stats window.

I was originally going to punt the clock for a later release, but I realized that I'd have to rearrange a lot of the user interface so that the missing clock wouldn't leave either ugly blank spaces or useless non-working displays; and then put it all back when I later got around to adding the clock back in. So rather than that, I just bit the bullet and made it work. And it's done now, and so is the All Statistics window. Yay!

5 comments: