-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Code enhancement suggestion #607
Comments
@muratlahur No, there was an update on the map issue. Please see #597 |
This is a behavior we don't want. We want food to be available wherever it is (except viruses), except when an enemy is dangerous. Also, this looks like bad code (sorry :-/). for (var j = foodList.length - 1; j >= 0; j--) {
if (this.computeDistance(getMapStartX(), foodList[j][1], foodList[j][0], foodList[j][1]) < blob.size * 10) {
foodList.splice(j, 1);
}
if (this.computeDistance(getMapEndX(), foodList[j][1], foodList[j][0], foodList[j][1]) < blob.size * 10) {
foodList.splice(j, 1);
}
if (this.computeDistance(foodList[j][0], getMapEndY(), foodList[j][0], foodList[j][1]) < blob.size * 10) {
foodList.splice(j, 1);
}
if (this.computeDistance(foodList[j][0], getMapStartY(), foodList[j][0], foodList[j][1]) < blob.size * 10) {
foodList.splice(j, 1);
}
} |
That's what he's saying. @muratlahur don't continue here - issue is being worked on |
I'm creating this issue to avoid a lot of issues from being created for little code improvements.
So we should keep here every suggestion directly related to code, no feature request or bug fix request, just code correction suggestion.
Example of valid suggestion : #606
You should give code along with your proposal and where it should be added.
The text was updated successfully, but these errors were encountered: