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

Experimenters create new item types: 5pts #232

Open
7 tasks done
skleinfeldt opened this issue May 1, 2023 · 2 comments
Open
7 tasks done

Experimenters create new item types: 5pts #232

skleinfeldt opened this issue May 1, 2023 · 2 comments
Assignees

Comments

@skleinfeldt
Copy link

skleinfeldt commented May 1, 2023

User story

As an experimenter I can specify a new kind of object that can appear on the map. It will have a unique ID, an icon to represent it, caloric value (non-zero makes it a food object), spawn rate, whether you can walk over/through it, whether it is interactive (yes/no - as opposed to immediately consumed like current GU), and how many times it can be consumed or used.

TODO

  • Change food properties to general object properties.
  • Replace the Food class with an Object class.
  • Refactor all code that uses food properties to take objects into account.
  • Change send grid info to send object data according to specification defined on Participants see items: 8pts #233.
  • Decide what to do about bots, since base GU bot's strategy is based on food.
  • Simplify game instructions
  • Get tests passing

Client/Server data spec

Grid serialization, including new representation of Food:

{
    "type": "state",
    "grid":
        {
            "players": [],
            "round": 0,
            "donation_active": false,
            "rows": 25,
            "columns": 25,
            "walls": [],
            "objects": [
                {
                    "id": 0,
                    "type_id": 1,
                    "position": [13, 14],
                    "maturity": 1.0,
                    "color": [0.54, 0.61, 0.06]
                },
                {
                    "id": 1,
                    "type_id": 1,
                    "position": [23, 16],
                    "maturity": 1.0,
                    "color": [0.54, 0.61, 0.06]
                },
                {
                    "id": 2,
                    "type_id": 1,
                    "position": [21, 0],
                    "maturity": 1.0,
                    "color": [0.54, 0.61, 0.06]
                },
                {
                    "id": 3,
                    "type_id": 1,
                    "position": [5, 11],
                    "maturity": 1.0,
                    "color": [0.54, 0.61, 0.06]
                },
            ]
        }
    }
}
@jessesnyder jessesnyder changed the title Experimenters create new object types Experimenters create new object types: 5pts May 3, 2023
@cguardia cguardia self-assigned this Jul 17, 2023
@alecpm
Copy link
Contributor

alecpm commented Jul 19, 2023

@cguardia see my note on #240 regarding how we can generalize food properties into object properties specifically as it relates to spawning objects/food.

@cguardia
Copy link
Contributor

Note that it was decided that bots will not be touched as part of this ticket.

alecpm added a commit that referenced this issue Jul 31, 2023
incorporate objects defined in yaml configuration into gridworld
@jessesnyder jessesnyder changed the title Experimenters create new object types: 5pts Experimenters create new item types: 5pts Jul 31, 2023
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

3 participants