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

Ensuring food is placed on grid #10

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

maxispeicher
Copy link
Contributor

The random generator for x and y could generate food places which are outside of the grid because it generates from 0 to 32 inclusive. However 32 should not be included.
By decreasing the upper limit of the random generator, the values generated are between 0 and 31.

The random generator for x and y could generate food places which are outside of the grid because it generates from 0 to 32 inclusive. However 32 should not be included.
@SudKul
Copy link
Contributor

SudKul commented Mar 23, 2021

Thank you, @maxispeicher for fixing the bug.

@SudKul SudKul merged commit 1e2d9ee into udacity:master Mar 23, 2021
@maxispeicher maxispeicher deleted the fix-food-placing branch March 23, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants