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

arr.splice instead of this.removeFromArray #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

arr.splice instead of this.removeFromArray #25

wants to merge 2 commits into from

Conversation

charbelsako
Copy link

@charbelsako charbelsako commented Jun 20, 2018

I know this is old. But I've recently watched the YouTube video, and realized that you can just use the winner (since this is already the index) to splice from the openSet.

Note: I've attempted this locally in my own project.

Link to project

On line 90. this.removefromarray isn't really needed when you already have the index of the thing to delete
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.

1 participant