Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a building game on top of briq: ask users to create a construction with X amount of briqs exactly #4

Open
s0lness opened this issue Jun 28, 2022 · 0 comments

Comments

@s0lness
Copy link

s0lness commented Jun 28, 2022

Overview

Create a Cairo contract that checks that a construction has a certain number of characteristics, like a "builder check", by passing the construction as calldata and checking it matches certain characteristics.
This would allow building competitions with on-chain governance: ensure that all the constructions submitted have a certain set of characteristics.

Some ideas:

  • Only on one axis
  • Nothing floats
  • Only use certain colors
  • Only in 2D
  • Only a certain number of briqs
  • Must match a shape
  • Only different briq colors
  • Pixel art according to Phi's rules
  • No more than 3 aligned briqs on the same axis
  • No more than one briq can touch the ground
  • No contiguous briqs

The briq constructions have the following structure, formatted in a json

            "pos": [
                -6,
                1,
                -15
            ],
            "data": {
                "material": "0x1",
                "color": "#6a6a6a"
            }
        }```

Any of these characteristics (material, position, color) can be used to build a rule.

###Acceptance criteria
GIVEN I have a construction that matches rule A
WHEN I mint my construction and check it against rule A
THEN the rule contract ascertains that the construction indeed has the correct characteristics.

###Other
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant