This workflow is as per the Game App.
- players transfer cards (with combo: 2a1b/1a2b) to escrow contract -
gpkbatescrow
- pair2players
- players transfer 5 WAX each
- players select cards manually/automatically based on time_limit of 30 sec
- play
- Now, Result:
- Case-1: if draw, then players get 1 more chance. If 2 times draw successively for 1 game_id, then the round is dumped. And the card is available for selection in the cardwallet
- Case-2: if nodraw, then winner receives 4 cards with 1 as winning reward, whereas the loser receives 2 cards with 1 losing card (any by shuffle)
-
player deposit game fee
-
player transfers cards (of any qty. either a/b) from
simpleassets
contract togpkbatescrow
contract. -
player selects the cards (max. 3 of
2a1b
/1a2b
combo) & the respective cards' status is set as "selected" & gets added into the players queue for pairing -
then presses Pair button to get paired with someone,
- where in the front-end the player gets to see the player's display pic (dp), but not eosio-accnt name, cards.
-
then the game_id is sent to the player & then the player1 presses Play button [OPTIONAL] with the game_id
- Here, the player2 is just notified about the pairing & game status. Let's say the player_2 presses button after already getting paired, the it gives error that "already available in game table"
- Case-1: if draw, then players get 1 more chance. If 2 times draw successively for 1 game_id, then the round is dumped. And the card is available for selection in the cardwallet
- Case-2: if nodraw, then winner receives 4 cards with 1 as winning reward, whereas the loser receives 2 cards with 1 losing card (any by shuffle)
- There are 3 main possibilities in game results of GPK.Battles.
- Case-1.1: when 1 player selects cards => 1 defaulter
- ACTION sequence:
play
>>del1drawgame
- Money sequence: deduct money from both players >> add money to defrayer player, & transfer deducted money from gpkbattlesco (i.e defaulter player) to gpkbatincome
- ACTION sequence:
- Case-1.2: when no player select cards => 2 defaulters
- ACTION sequence:
play
>>del1drawgame
- Money sequence: deduct money from both players >> transfer deducted money from gpkbattlesco (i.e defaulter players) to gpkbatincome
- ACTION sequence:
- Case-2.1: 1-draw >> 2-draw
- ACTION sequence:
play
>>play
- Money sequence: deduct money from both players >> transfer deducted money from gpkbattlesco (i.e on behalf of both players) to gpkbatincome
- ACTION sequence:
- Case-2.2: 1-draw >> nodraw
- ACTION sequence:
play
>>play
- Money sequence: deduct money from both players >> transfer deducted money from gpkbattlesco (i.e on behalf of both players) to gpkbatincome
- ACTION sequence:
- ACTION sequence:
play
- Money sequence: deduct money from both players