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

Internal array to store food and tools #125

Closed
mrfatguy opened this issue Apr 3, 2024 · 0 comments · Fixed by #140
Closed

Internal array to store food and tools #125

mrfatguy opened this issue Apr 3, 2024 · 0 comments · Fixed by #140
Assignees
Labels
code Pure technical or internal work, no analysis or documentation needed

Comments

@mrfatguy
Copy link
Contributor

mrfatguy commented Apr 3, 2024

Please, implement and internal arrays that will hold IDs of user possessions in the Food Inventory and Tools Inventory.

For Food Inventory it is suggested to use 4 x 28 array. Example:

let food = [
    [28, 29, 29, null, null, null, null, 4, 3, 10],
    [1, null, null, 1, 2, 3, 9, 5, 6, 4],
    [31, 4, 9, null, 31, 9, 8, 4, 7, 6],
    [29, 29, 29, 29, 29, 29, 29, 29, 29, 29]
];

But, these are non-mandatory suggestions to consider only. Details: here.

When starting a new game the entire array should have all items' initial values set to null.

For the reasons explained here, for Tools Inventory it is suggested to use 4 x 28 array as well, but such that will hold quantity as well. Example:

let tools = [
    [[19, 1], [21, 1], [22, 1], null, null, null, null, null, null, null],
    [null, null, null, null, null, null, null, null, null, null],
    [[24, 1], [23, 1], [27, 1], [12, 1], [14, 1], null, null, null, null, null],
    [[25, 1], [26, 50], [26, 50], [26, 50], [26, 50], [26, 11], [16, 1], [17, 1], [21, 1], [13, 1]]
];

But, these are non-mandatory suggestions to consider only. Details: here.

When starting a new game the entire array should also have all items' initial values set to null.

@mrfatguy mrfatguy added the code Pure technical or internal work, no analysis or documentation needed label Apr 3, 2024
MadejaMaciej added a commit that referenced this issue Apr 14, 2024
MadejaMaciej added a commit that referenced this issue Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Pure technical or internal work, no analysis or documentation needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants