np-eazy / Pentaquad

3 stars 1 forks source link

Implement SRS wall kicks #50

Closed np-eazy closed 1 year ago

np-eazy commented 1 year ago

To be more accurate with Tetris's official system, we should be implementing rotation differently. Right now the rotated block goes in the opposite of its falling directions 3 blocks to find open spots before aborting, but the Tetris convention is to check once in each direction and once in the original for a total of 5 different checks.

We can just recycle and for-loop collisionCheck(dxn) and dxn.turnLeft(1) until we get one that passes, then move in that direction (or opposite based on convention, but one of them has to work)

np-eazy commented 1 year ago

100