It seems that my plan is working ...
After having spent many hours drawing creatures for SeaRose, my brain has suddenly developed a craving for coding !
"So", I thought to myself, "why not do something simple and not too personal? Like maybe a card game. You know how you hate not having Spider Solitaire on your Windows 10 machine ... Think about it : in a couple of days, you'll feel like working on SeaRose again, and you will have Spider Solitaire to while away time with ! It's perfect, and it will be a lot of fun !"
After two days of tinkering with the game, I have come to the realization that this is not
going to be such a simple game to make after all (but it is still fun !).
I've become acutely aware of how many rules I will need to program, and how I will need to keep track of movements of cards over time (if I want an 'undo' function).
I'm not entirely sure how this adventure will end ... But, as I said, it's fun and I'm sure I'm learning 'something'. (Perhaps : not to program card games =).)
This is the result after a couple of hours of 'quick & dirty' programming (to get a feel of what will need to be done). The card stack positions are calculated relative to the window size. Cards have a notion of being face up / face down. The appropriate number of cards have been assigned to each of the top card stacks, from a randomized card stock.
And now the tricky part begins ...
See the difference ? The cards should not be exactly on top of each other. This means
that card positions need to be calculated relative to the position of the previous card on the stack !
So, somewhere, someone will need to keep track of which cards are on which stack ... I'm not sure yet if it will be more convenient to store that information in a 'Stack', or in a 'Card'.
Edit : Sigh. My (autistic) brain is so excitable. It just couldn't stop thinking about cards and arrays and layouts, last night.
So no, I didn't get any sleep. Funny, how that goes, sometimes ... =)