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/7
Details:
Recently I added scores view. Today I would like to show you similar view, but with different data: bidding history. It is required for bidding phase.
Some time ago I presented to you the whole state of the game logic project (1k
). It's described i.e. here. I mentioned about the way bidding history is being stored inside the redux state:
Please, focus on lines :260 - :264. You can see there are set of player bids. pass
property shows us whether player rejected to bid and is no longer involved in bidding process.
I decided to use the same shape of object in the 1k-table
:
As it's defined in global state, we can access it inside the Bids
UI component with no effort. How does the component look like? Quiet simple, I guess:
If you are not familiar with the Vuejs, you might find this code fragment, let's say, "chaotic"?
We have basically the whole component definition in one file. It includes template, javascript code and styles. This approach is really convenient for small component definitions.
In line :21 I access global store to get bid
history. It's done within the bids
function defined in computed
area of the component. Pure store data is being parsed (using slice
, reverse
, etc.) in order to prepare data before displaying in. Manipulated bids
list is accessible in the template, where we do basically iterate over those entries.
Each table row is displayed through separated bid-row
component (:6). If you would like to see more, check pull request!
Later, bidders!
Recent articles:
Thousand Card Game: Scores View Added
Thousand Card Game: Trick Position Animation
Thousand Card Game: Trick Animation
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
I really enjoy seeing consistent updates to a cool project - thank you for contributing to utopian!
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks, I also appreciate your moderation work!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey there. I have both your approve and utopian-bot upvote, but the post is still flagged as "Under Review". Not sure how it works internally, but is it consistent with your moderation work-flow?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The API is having some issues after the newest update, you don't need to worry, this post is accepted and will continue to be.
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