C

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. If no players were willing to join the game after it had been created, the creator is allowed to withdraw there staked tokens.

  7. 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 .

  8. 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

  1. Smart Contract needed to be flexible in accepting payments for multiple tokens over the polygon network.
  2. Identification of available ERC20 tokens on Polygon Mumbai testnet with their faucets for testing purposes was difficult.

Discussion