Here's a large bundle of changes I've been working on in my fork, in case you would like to have them, too. I'll try to list them succinctly:
Incorporate earlier pull request from @apinkney97
I incorporated an earlier pull request to alter the way controllers are instantiated, which also allows for nicer declarations of controller fields.
Changes to card holders
These are generally breaking changes.
Fix bug - last_card_callback now invoked in all cases.
is_clicked now returns true if any card in the holder is clicked. New is_top_card_clicked method to test just the top card.
sort_cards can accept override sorting scheme.
Stop using card_sprite to control whether a card is "clicked" or not. Instead, move this logic to a much higher level - into CardsHolder and the sub-class GrabbedCardsHolder.
Remove all the check_mouse and sprite.clicked logic, so that there is now only one way to "grab" cards out of a holder.
New animation system
I replaced the old Controller.moves collection with a Controller.animations collection accompanied by the new animation.py module. See README.md. The new example games make use of all the new animation logic.
I added animation of cards for Klondike.
New sample games
Created new sample games War and Crazy 8s that showcase the following:
Playing against a very limited computer opponent.
Pulsing the background color.
The line-to-spiral animation (Crazy 8s - try playing an 8.)
Here's a large bundle of changes I've been working on in my fork, in case you would like to have them, too. I'll try to list them succinctly:
Incorporate earlier pull request from @apinkney97
I incorporated an earlier pull request to alter the way controllers are instantiated, which also allows for nicer declarations of controller fields.
Changes to card holders
These are generally breaking changes.
last_card_callback
now invoked in all cases.is_clicked
now returns true if any card in the holder is clicked. Newis_top_card_clicked
method to test just the top card.sort_cards
can accept override sorting scheme.card_sprite
to control whether a card is "clicked" or not. Instead, move this logic to a much higher level - intoCardsHolder
and the sub-classGrabbedCardsHolder
.check_mouse
andsprite.clicked
logic, so that there is now only one way to "grab" cards out of a holder.New animation system
I replaced the old
Controller.moves
collection with aController.animations
collection accompanied by the newanimation.py
module. SeeREADME.md
. The new example games make use of all the new animation logic.I added animation of cards for Klondike.
New sample games
Created new sample games War and Crazy 8s that showcase the following: