Thousand Card Game: Testing Phases Transition

in #utopian-io7 years ago (edited)

image.png
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/9

Details:

The main goal of the project (1k-table) is to create thousand card game table client web-app, which will display the state of the game, based on player actions.

Those actions will be received from server side, where the whole game logic will be performed.

But for now, there is no server side yet implemented... But actually, as I have implemented fully working game logic lately (gornanization/1k), why don't we just include it into the 1k-table project temporary?

For what? What are the benefits?

Having game logic baked into the table client web-app allows us to perform player actions. Such actions creates side effects, which might be presented to the players, by updating UI state. It's pure action -> reaction pattern. Thanks to it, we can test game phases transition which is crucial regarding to the overall project quality level.

Again, it's all about testing. Wan to see it in practice? Here you go:

What you can see is basically set of game phases transition, starting from player registering through dealing cards, bidding process finally into the sharing stock phase. Here is set of actions, causing above UI flow to be performed:

image.png

Those actions affects the UI indirectly within events propagation. We are listening on the event emission, then (based on some additional factors) we are dispatching actions which forces the UI to be updated. Generally it looks like this:

image.png

But in reality, it is slightly more complex :) I think it's a huge step forward in development. More details? see pull-request!

Later, dear observers!

Recent articles:
Thousand Card Game: Positioning Cards
Thousand Card Game: Bidding View Added
Thousand Card Game: Scores View Added



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

Christmas came really early this year as we now pay 2x of what we used to to our incredible developers. Enjoy!

You can contact us on Discord.
[utopian-moderator]

Your approves are being made so quickly. Thank you!

adasq!! Thank you, your Post.

Coin Marketplace

STEEM 0.20
TRX 0.15
JST 0.030
BTC 65637.68
ETH 2661.86
USDT 1.00
SBD 2.81