Tuesday, December 18, 2012

Have It Your Way

I've just finished adding a new feature to Solitaire Till Dawn, one I've wanted since forever ago. I have a compulsive nature, and when I play cards to the foundations (the goal piles), I like to assign the suits to piles in this order: Hearts, Spades, Diamonds, Clubs. If it's a two-deck game then I like to double them, two by two: Hearts, Hearts, Spades, Spades, and so on. I want this enough that if an Ace is auto-played to the "wrong" pile, I will undo and then drag the offending card to the "right" pile before continuing. Of course it's easy enough to just do the dragging; but it would be even easier to just click the card and see it go straight to the right place!

I could have just hard-coded this behavior, but I never did that because I am sure that some of you have your own preferences in this, and they may differ from mine. I don't want to force my own baseless prejudices on any of you. Over the years I occasionally considered inventing a set of options for the Preference panel to give you some control over suit placement, but this always seemed like huge and confusing overkill, so I never did anything about it.

But I think I've finally got it sussed out, and my solution will be included in the new release. It is simply this: for each kind of solitaire that you play, Solitaire Till Dawn will remember which suit you put in each goal pile. After that, any automatically-moved cards of each suit will go to the same piles where you put them in prior games.

If you later decide you don't like that placement, all you have to do is place the cards by hand in whatever other piles you like, and Solitaire Till Dawn will remember your new choices from then on.

Very simple, and no need for any new controls or options in the Preferences window or anywhere else.  There's nothing you need to learn; it will just happen automagically. (And of course, if you just don't care where the Aces fall, you can ignore the whole business.)

I got this working today. Yay!

Thursday, December 13, 2012

Winner, Winner, Chicken Dinner

Just finished up the "you win" alert. This was not so complex as the All Statistics window, but it had its own little collection of picky details to get right: show on early win or not, according to your preferences; several relevant prefs checkboxes right there in the alert, for convenient access; and it will start a new game when you dismiss it, if you've selected that option.

Per ardua ad astra!

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!

Friday, November 23, 2012

That Pesky "All Stats" Window

If you've been following closely, you'll know that lately I've been working on the "All Statistics" window, which displays every statistic that the program tracks for the game you are currently playing. This includes longest win and loss streaks, longest and shortest games by time and by move count, and more. It's a surprisingly complex window. It seems as if it should just display some numbers, which should be simple. But there's a lot going on behind the scenes: things like implementing the clock that keeps track of how much time you've spent, handling the special scoring that some games have (especially the game TriPeaks, which has quite unique scoring), and a good deal more. This work is now mostly done, but I am still finishing up the clock (which has to pause and resume when you switch away from your game to do something else, and then switch back again). As part of this work I will also be implementing the standard "You win!" window, which includes some shortcut controls for some preference settings, and which interacts a bit with the All Stats window.

Welcome!

Welcome to the new Solitaire Till Dawn blog, dedicated solely to news about Solitaire Till Dawn.

This blog is a sort of spin-off from my personal blog. I meant that blog to be for myself and a few friends, and never expected or wanted a wider readership. But there has been a lot of interest in my progress on the new version of Solitaire Till Dawn, and now I find that the great majority of my readers are interested only (or at least, mainly) in Solitaire Till Dawn. As a result, all my posts in that blog now seem to have to include at least a snippet of news about solitaire, which was never what I wanted.

So I've created this blog to separate my personal stuff from solitaire news. If you care only about Solitaire Till Dawn, I encourage you to bookmark this blog and forget about the other. Of course, if you're the friendly kind of customer who is also interested in the rest of my activities, you may certainly keep reading the other blog as well: in this case, "personal" doesn't mean "private" and all readers are welcome.

More posts will soon follow this one, with actual news. This note is just to introduce the new blog, and welcome you all aboard!