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

fix(tetris): move 2 lines down #205

Merged
merged 2 commits into from Oct 3, 2021

Conversation

alocquet
Copy link
Contributor

@alocquet alocquet commented Oct 3, 2021

I don't understand why do you remove index to line : if a block is on a line upper than removed line, it should move down. This is independent of removed line index in 'lines2' array.

I have tested with 2 and 3 lines removed and it work.

If you are ok with that, I can also refactor this code to rename variables like lines2.

@alocquet
Copy link
Contributor Author

alocquet commented Oct 3, 2021

Fixes #117

@grzi
Copy link
Owner

grzi commented Oct 3, 2021

@alocquet Indeed .. thanks . I actually don't remember why I did this, I certainly took a wrong path when implementing this.

Any refacto to make the code cleaner is more than welcome !

@alocquet alocquet force-pushed the fix/tetris-move-two-lines-down branch from 64dc65a to a6f27d6 Compare October 3, 2021 18:40
@alocquet alocquet force-pushed the fix/tetris-move-two-lines-down branch from a6f27d6 to 32d3ca5 Compare October 3, 2021 18:41
@alocquet
Copy link
Contributor Author

alocquet commented Oct 3, 2021

I have renames some variables. Let me know if you think it is more readable.

@grzi grzi linked an issue Oct 3, 2021 that may be closed by this pull request
@grzi
Copy link
Owner

grzi commented Oct 3, 2021

Yeah perfect. Thanks :)

@grzi grzi merged commit ebdaad6 into grzi:main Oct 3, 2021
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.

When scoring two line in Tetris, the upper blocs don't go down for 2 lines
2 participants