This is an experimental idea related to the New Game animation issues (#1 #4 #5). One theory is that the animations issues are related to the idea that there's a different stacking order (zIndex) for the same cards in the playArea, deck, and discardPile - so the animation system cannot compute a consistent way to draw the views for the insertion and removal animations.
I think we could insert all the playArea cards back to be the topmost cards on the deck, and insert all the discardPile cards back to the the bottom cards in the deck. They would all have to flip over at the same time. These changes would be in one withAnimation block. Then in another withAnimation block, with a delayed animation (or maybe no animation at all), the deck would be shuffled. Finally in another withAnimation block with a delayed animation the new game would be dealt.
This is an experimental idea related to the New Game animation issues (#1 #4 #5). One theory is that the animations issues are related to the idea that there's a different stacking order (
zIndex
) for the same cards in the playArea, deck, and discardPile - so the animation system cannot compute a consistent way to draw the views for the insertion and removal animations.I think we could insert all the playArea cards back to be the topmost cards on the deck, and insert all the discardPile cards back to the the bottom cards in the deck. They would all have to flip over at the same time. These changes would be in one
withAnimation
block. Then in anotherwithAnimation
block, with a delayed animation (or maybe no animation at all), the deck would be shuffled. Finally in anotherwithAnimation
block with a delayed animation the new game would be dealt.