Image source: pixabay.com
What is this project about?
This contribution is made to gornanization/1k-table. If you would like to find more info - I strongly recommend reading this post first.
PR:
https://github.com/gornanization/1k-table/pull/5
Details:
As you can see above, I defined new positions. It includes:
DECK
position (It's basically place, where three trick cards comes from, the very top of the screen),TRICK_FIRST
,TRICK_SECOND
,TRICK_THIRD
(Centre of the screen, three card position reserved for trick).
How about code standing behind the animation?
It includes few actions (:67 - :70):
moveCardsToStock
showStockCards
- delay
moveStockCardsToWinner
It starts with moveCardsToStock
. It simply moves stock cards from DECK
into STOCK
position. When we have all three cards already on the centre of the table, we can show this card to the players, one by one, with some delay in between (see showStockCards
). After that, we can move this card to the player. In this particular case I assumed that the first player (linked with PLAYER_FIRST
position) won the biding phase.
Within the contribution I also specified three additional positions for cards being won by the players. Those positions are: WON_PLAYER_FIRST
, WON_PLAYER_SECOND
, WON_PLAYER_THIRD
.
Above you can see the case, when the second player won a trick. Won cards are being moved from trick position into specific area near the player, as it will no longer be used within the current battle anymore.
More details? See the pull request!
Bye Bye, Winners!
Recent articles:
Thousand Card Game: Trick Animation
Thousand Card Game: State Management
Thousand Card Game: Card & Table Components
Posted on Utopian.io - Rewarding Open Source Contributors
Nice Post
Happy New Year
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for the contribution. It has been approved.
Nice to see another update from your end! You're one of the few authors who consistently provides a crisp overview of their work that makes for easy viewing to a casual reader. Keep it up!
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @adasq I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit