Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Finish Snake game #25

Open
thiscaspar opened this issue Sep 29, 2023 · 4 comments
Open

Finish Snake game #25

thiscaspar opened this issue Sep 29, 2023 · 4 comments
Assignees

Comments

@thiscaspar
Copy link
Member

thiscaspar commented Sep 29, 2023

Description

We aim to develop an on-chain version of the classic Snake game. The game will involve players picking unowned pixels and directions, with the snake moving at a predetermined speed until it reaches an impassable pixel.

Game Process:

  1. Pick Pixel: A player picks an unowned pixel to start their snake.
  2. Pick Direction: The player then picks a direction for the snake to move in.
  3. Snake Movement: At a predetermined speed, the snake moves in the chosen direction.
  4. End Game: If the snake reaches a pixel that does not allow it to pass through, the snake dies and the player is notified.

Requirements:

  1. Smart Contract: Develop a smart contract to handle the game logic and pixel ownership.
  2. Front-End Interface: Create a user-friendly interface for players to pick pixels, choose directions, and view 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 Snake game.
  2. Comprehensive documentation explaining how to play the game and how the smart contract works.
  3. Test cases and their results.
@mariz-ov mariz-ov self-assigned this Oct 2, 2023
@mariz-ov
Copy link
Contributor

mariz-ov commented Oct 2, 2023

Interaction suggestion with paint pixels:

  1. When the pixel is the same color as the snake, the snake grows longer
  2. When the pixel is not the same color, it dies

@0xshora
Copy link

0xshora commented Oct 2, 2023

No, that is too many times for the snake to die.
Btw, did you read about this article?
https://medium.com/@syora/discovering-pixelaw-the-fully-onchain-planet-ac5e8bb40dfb
This is the basic concept for this project.

@mariz-ov
Copy link
Contributor

mariz-ov commented Oct 3, 2023

Okay...so what if everytime a snake passes by a paint pixel, it mixes its current color with the paint pixel, but if it hits a white or black pixel, it dies?

@0xshora
Copy link

0xshora commented Oct 3, 2023

Sounds good, but I don't think we need to interact every time.
How about this:

  • If it's the same color, the snake will grow.
  • If it's black or white, the snake dies.
  • Otherwise, nothing happens.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants