-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a fairly simple win animation that 'blows up' stacks of cards towards the center of the table. Single cards are grouped with other stacks or single cards and cards removed from the table are push to the table from the bottom. If the device is rotated the animation will be stopped and generated again. Similarly going back and redoing the winning move will make the animation to start over from scratch. If page is not active, the animation is paused. Normal distribution is used for angle and chi-squared distribution for radius. Parameters were experimentally figured out to give the best general result. Animations use game seed to generate random numbers. This way animations are deterministic. They may still vary from device to device and from version to version. Engine is in another thread but it should be safe to get a copy of the seed. Signed-off-by: Tomi Leppänen <tomi@tomin.site>
- Loading branch information
Showing
4 changed files
with
366 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.