The problem with blockchain games is that when the first player makes a move, the second one can see it and make a move that is beneficial for itself.
- The first player makes a move in an encrypted way;
- The second player makes a move without encryption;
- The first player knows his move and sees the move of the second player, he can already determine whether he won or not;
- If he wins, he sends the cipher of his turn (3 random words) to the blockchain and receives a prize;
- If he loses, he can ignore sending proof of his move, in which case, after the set time, the second player will be considered the winner and will be able to take the prize.
- Heads Or Tails;
- Rock Paper Scissors;
- Attack and Defense;
- and others ...
- All game contracts are created through a contract factory;
- The application and games frontend is stored in IPFS;
- Chainlink is responsible for generating a random number;
- Blockchain where the application is deployed - Polygon.