You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
2players smart contracts solve this problem:
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.
Ready-made smart contracts for the game of two players:
Heads Or Tails;
Rock Paper Scissors;
Attack and Defense;
and others ...
Technology:
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.