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

Fixed bug in Tetris #381

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

unDeadHerbs
Copy link

@unDeadHerbs unDeadHerbs commented Mar 12, 2023

Game re-places the last piece after it is placed and a new one is generated. This only happens sometimes, I think because it depends on how the location was reached and isn't visible if lines weren't removed.

What's new

The changes are:

  • Combining wasDownMove and tetris_game_piece_at_bottom
    • Most of the diff is from this re-indenting
  • Adding an else to prevent rendering old piece
  • removing double render if placemenet was final

Checklist (For Reviewer)

  • PR has description of feature/bug
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Game re-places the last piece after it is placed and a new one is generated.
This only happens sometimes, I think because it depends on how the location was reached and isn't visible if lines weren't removed.
@unDeadHerbs unDeadHerbs requested a review from xMasterX as a code owner March 12, 2023 06:33
Copy link
Member

@xMasterX xMasterX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, actually when you removed tetris_game_remove_curr_piece on line 299
it made game not work at all, it just starts on gameover screen and you can't restart it, it will go straight into game over screen

Adding tetris_game_remove_curr_piece back makes game work but pieces will not stay on bottom, they are removed instantly, so this is not a solution

Please fix described issues and test your changes, for now ill convert this PR to draft

@xMasterX xMasterX marked this pull request as draft March 14, 2023 11:09
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.

2 participants