A decentralized web app where you can play the card game Teen Patti.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to install either npm
or yarn
to build this project. Here are the link to resources to get started.
First of all clone the repository using the following command.
git clone https://github.com/utkarshg6/3patti-dapp.git
In case you are installing through npm
follow the instructions below. If you are installing through yarn
then jump ahead to installation through yarn
.
npm i
To install the dependencies you can do it by using the following command.
yarn
This command will recreate the build
folder inside the ethereum
and will create JSON files for the compiled Contract of only Game.sol
.
npm run compile
This command will run all tests for the project through mocha.
npm run test
You may find the dependencies inside the package.json
file.
- Factory Initialization
- Game Contract Initialization (with minimum balance and manager)
- Players enter the game.
- Game is started by the Manager.
- Game is saved by the Manager.
- Game is Ended by the Manager.
Has Game Ended | Has Game Started | Status |
---|---|---|
false |
false |
Game Not Started |
false |
true |
Playing |
true |
false |
Not Played but Ended |
true |
true |
Played and Ended |
- deploys a factory and a game
- marks caller as the game manager
- allows users to enter the game and mark them as players along with the correct amount
- requires a minimum amount to enter
- allows the manager to start a game
- does not allows anyone else to start a game
- allows the manager to save a game
- allows the manager to end a game