DICE LIGHTLINKCHAIN(nextjs+prismadb+pusher channel+USEMOONAI SDK(email Signup and LogIn) Here is the final results where the user 1 has won 1000k DPK crypto token after successfull rounds : https://pegasus.lightlink.io/tx/0x03808ea2431dd0e07ba2d0fe8ecf859c1cfcf8464fb28b348f23600455e770fb
Details of DPK token:0xb4231b9730b0043046548e5AF99085d5df8753E3 The contract DICEPOKERGAME given 1000DPK to the winner :0x99F5F819ce26480732523f0a195B51424ece71Ca
You can see all the transaction, few of them are for rolling dice for first time, also rerolling the dice for selected dice example shown in the demo, we see in demo the first user got 6,1,6,6,6(four of a kind) still he went for reroll for the second dice '1'(to change 2nd dice,we internally take this as an array of which second position marking it as '1' requesting the length which is one in this case) to expect five of a kind and get five of a kind to get all hightime rank.Well for few functions we would like to automate in future,even for transferring coins directly to winners, without need to claim. Track all transcations happened here: https://pegasus.lightlink.io/address/0xb4231b9730b0043046548e5AF99085d5df8753E3?tab=token_transfers here is the total pool prize of two players in three rounds of worth 1000DPK tokens
Ranking of cards: From the lowest to the highest:
nothing Nothing — five mismatched dice forming no sequence longer than four.
pair Pair — two dice showing the same value.
2 pairs Two Pairs — two pairs of dice, each showing the same value.
nothing Three-of-a-Kind — three dice showing the same value.
5 high straight Five High Straight — dice showing values from 1 through 5, inclusive.
6 high straight Six High Straight — dice showing values from 2 through 6, inclusive.
full house Full House — Pair of one value and Three-of-a-Kind of another.
4 of a kind Four-of-a-Kind — four dice showing the same value.
5 of a kind Five-of-a-Kind — all five dice showing the same value.
First user need to signup through their emailId, login all done by the useMoonai sdk where it generates a profile
Then you need to create an account with just one click to get wallet address, tnx to usemoonai sdk
After the setup you can either create a room and join a room :
This is it where you can start the game, where all witcher dice poker game rules are followed, follow this video if you aren't familiar https://www.youtube.com/watch?v=ewqAtvDZHeo