Skip to content

fix(game): drop pieces with empty matrix rows to the floor#30

Open
rohitmulani63-ops wants to merge 1 commit into
itssimmons:mainfrom
rohitmulani63-ops:fix-hard-drop-empty-rows
Open

fix(game): drop pieces with empty matrix rows to the floor#30
rohitmulani63-ops wants to merge 1 commit into
itssimmons:mainfrom
rohitmulani63-ops:fix-hard-drop-empty-rows

Conversation

@rohitmulani63-ops

Copy link
Copy Markdown

Description

Fixes #3.

I updated the hard-drop positioning so it uses the lowest occupied row inside the tetromino matrix instead of treating the full 4x4 matrix height as occupied. This lets pieces with trailing empty rows land on the lowest valid board row.

I also adjusted tetromino baseline calculation to collect the lowest occupied block per occupied column. That avoids including upper blocks when the rightmost 4x4 column is empty.

/claim #3

Type of change

  • Bug fix

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings from the checks I could run

Validation

  • Ran: git diff --check
  • Ran: hidden Unicode/bidi control-character scan on the changed source file
  • Not run: Bazel build, because Bazel is unavailable locally
  • Not run: local C++ compile, because a C++ compiler is unavailable locally

@opirebot

opirebot Bot commented Jun 23, 2026

Copy link
Copy Markdown

😅 Ups... the issue does not have any reward yet!

@itssimmons

Copy link
Copy Markdown
Owner

Hi @rohitmulani63-ops, so great to see contributions in this tiny venture of mine. Let me run it, and I'll get back to you again.

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.

[pending] hard drop it is not going all the way down if the piece grid (4x4) has empy rows at the end

2 participants