pixelaw / game

PixeLAW, the game.
MIT License
7 stars 2 forks source link

Finish RPS game #26

Open thiscaspar opened 1 year ago

thiscaspar commented 1 year ago

Description

We aim to develop an on-chain version of the classic Rock Paper Scissors game. The game will involve players making choices on specific pixels, with the winner gaining ownership of the pixel.

Game Process:

  1. Player 1's Move: Player 1 drops a choice (rock, paper, or scissors) on a certain pixel. This choice will initially show as a question mark to keep it hidden from Player 2.
  2. Player 2's Move: Player 2 drops their choice (rock, paper, or scissors) on the pixel next to Player 1's pixel. This choice will be immediately visible.
  3. Reveal: Player 1 reveals their initial choice.
  4. Determine Winner: The game determines the winner based on the classic rules of Rock Paper Scissors. The winner gains ownership of the pixel.

Requirements:

  1. Smart Contract: Develop a smart contract to handle the game logic and pixel ownership transfers.
  2. Front-End Interface: Create a user-friendly interface for players to make their moves and see the current state of the game.
  3. Testing: Thoroughly test the game to ensure it works correctly and securely.

Deliverables:

  1. A fully functioning on-chain Rock Paper Scissors game.
  2. Comprehensive documentation explaining how to play the game and how the smart contract works.
  3. Test cases and their results.