Skip to content

Conversation

@marler8997
Copy link

I think I found a way to remove a good chunk of collision detection code. Instead of using logic to figure out which blocks are apart of the current piece and which are apart of the placed pieces, I modified the code to remove the current piece before checking for collisions on it's new position. Now we can simply use isCovered to check whether the new position has a collision.

I'm not 100% sure this has the same behavior as before, but I tested playing a game and it seems to work.

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