DAO.Casino released BlackJack Beta based on Ethereum smart contracts
DAO.Casino team along with EtherionLab are proud to introduce a beta version of BlackJack powered by DAO.Casino blockchain protocol. All inner-game logic is based on smart contracts. The Game contains all features and advantages of our protocol: implemented random in Ethereum virtual machine, bankroll backer.
One of the basic complications at the beginning of development was a gas limit. Game code was too bulky and it was nearly impossible to squeeze it to one contract, so we decided to separate contract on several parts. At the present moment game consist of 5 major contracts and 3 additional ones. Game includes all necessary actions: deal, hit, stand, double, split and insurance.
To put the whole project together and deploy it in the blockchain, our team used the “truffle” (developer tool). In-game logic is pretty complicated, so a special “test” was written, which checks the execution of the entire process. Thus, it became easier for us to track the bugs of the contract.
The next obstacle was the realization of a fair random component. To solve this problem, we implemented a confirmation method in the contract. To do this, we had to rewrite about 30% of the game contract. The game was worth the candle, we managed to create true object-oriented programming on smart contracts.
Frontend duplicates all of the smart contract logics and acts like an additional control check for all players actions. In ropsten network the game runs pretty slowly, thats why for basic testing we use testrpc. Afterwards we run new tests on testnet (ropsten). As for the appearance, here we resorted to the services of freelance studio to create a 3D model of the game deck and all the other necessary components.
At the moment, the DAO.Casino team is working on developing a faster BlackJack, so that the gameplay is more enjoyable for users. Stay tuned, subscribe to our newsletter via website, join our Slack channel and give your feedback!
White Paper: https://github.com/DaoCasino/Whitepaper/blob/master/DAO.Casino%20WP.md
Slack Invite: https://dao.casino/slack-invite.html