Check&Mate
A multiplayer Decentralized Chess game, enabling players to have a chance to win tokens(crypto assets) by staking there share of any tokens before playing a game
Created on 12th December 2021
•
Check&Mate
A multiplayer Decentralized Chess game, enabling players to have a chance to win tokens(crypto assets) by staking there share of any tokens before playing a game
The problem Check&Mate solves
-
Check&Mate is an online multiplayer chess game where players who wish to play the game are set to stake some amount of tokens(Crypto assets) before the start of a game.
-
A player who wishes to create a match begins with staking their share of desired tokens of any amount.After the successful transaction, a unique url for that game is generated allowing the creator to invite another player to join the game or share it with friends.
-
The Invitation link to join the game is created using socket programming where a unique room is created for every game allowing only 2 players to join per game.
-
After receiving the invitation link from Player 1, player 2 has to at least match the valuation of there desired tokens with the USD equivalent of what player 1 had staked while creating the game.This condition must be satisfied in order to start the game.
-
Every player is provided with a list of tokens (list includes tokens like WETH,DAI,LINK,WMATIC currently the most popular tokens on polygon) , from which a player has to select any one token for staking.
-
If no players were willing to join the game after it had been created, the creator is allowed to withdraw there staked tokens.
-
To provide some assistance, all possible valid moves for all pieces are shown within the chessboard everytime a player hovers over any piece.Players can also have a look at all the previously made moves within the game to analyze the game better .
-
After a checkmate is identified , the winner is allowed to retrieve the winning payout i.e all the tokens staked by both players over that game.
Challenges I ran into
- Smart Contract needed to be flexible in accepting payments for multiple tokens over the polygon network.
- Identification of available ERC20 tokens on Polygon Mumbai testnet with their faucets for testing purposes was difficult.
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.