A decentralized Rock Paper Scissors game built with Solidity, Web3.js, and an ERC-20 token called MemeCoin. Players can join, make moves, and win rewards in MemeCoins.
A decentralized Rock Paper Scissors game built with Solidity, Web3.js, and an ERC-20 token called MemeCoin. Players can join, make moves, and win rewards in MemeCoins. The game is interactive and styled for an engaging experience.
Claim Initial Tokens: Players can claim 100 MemeCoins for free.
Join Game: Two players can join the game by paying an entry fee in MemeCoins.
Make a Move: Players can choose Rock, Paper, or Scissors to compete.
Determine Winner: The smart contract determines the winner and transfers rewards.
Reset Game: Players can reset the game for a fresh start.
Live Updates: Player and balance information can be refreshed dynamically.
RockPaperScissors Contract: Manages the gameplay, player states, and rewards.
MemeCoin Contract: Handles the ERC-20 token used for payments and rewards.
Players join by paying an entry fee in MemeCoins.
The game resolves based on the standard Rock-Paper-Scissors rules.
Winner receives the pot and additional rewards.
Contract Address: 0x44c72D1A6791A06174C304F510aEB604770936A4
Network: EduChain Testnet
Contract Address: View on Explorer
Coin Used: EDU
The frontend is designed for simplicity and engagement:
Responsive Design: Fully responsive, optimized for both desktop and mobile.
Custom Buttons: Interactive buttons styled with vibrant colors and hover effects.
Game Moves: Rock, Paper, Scissors moves are represented with images.
Live Player Tracking: View player addresses and refresh player status dynamically.
Balance: Displays the user's MemeCoin balance.
Players Joined: Shows current players in the game with a refresh button.
Game Controls: Includes buttons for joining, making moves, determining the winner, and resetting the game.
Claim Tokens: Users can claim 100 MemeCoins to get started.
Join Game: Two players join by transferring an entry fee in MemeCoins.
Make Moves: Players select Rock, Paper, or Scissors.
Determine Winner: The contract evaluates the moves and transfers rewards.
Reset Game: Allows a fresh start for a new game.
Solidity: For the smart contract logic.
HTML, CSS, JavaScript: For the user interface.
ERC-20 Standard: Used for MemeCoin.
Rock beats Scissors.
Scissors beat Paper.
Paper beats Rock.
If both players choose the same move, the game is a draw, and their stakes are refunded.
During the hackathon, our team successfully developed "Chain Reflex," a decentralized Rock Paper Scissors game utilizing Solidity and Web3.js, integrated with our custom ERC-20 token, MemeCoin. We implemented key features such as initial token claiming, game joining with entry fees, move selection, and dynamic winner determination based on classic game rules. The smart contracts for managing gameplay and token transactions were deployed on the EduChain Testnet, providing a robust and interactive platform. Additionally, we crafted a responsive and engaging user interface that enhances the gaming experience across devices. Our progress demonstrates a functional integration of blockchain technology with traditional game mechanics, highlighting our commitment to innovation and user-centric design in the blockchain space.