Skip to content

Commit

Permalink
fix: fix reduced rotation range
Browse files Browse the repository at this point in the history
  • Loading branch information
CSharperMantle committed Jul 9, 2023
1 parent 15cbb9f commit 9ca290f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/model/Tetrimino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ export class Tetrimino {
collisionChecker: TCollisionChecker
): boolean {
// Find the final direction
const count = Direction.LENGTH / 2

const delta = rotationDirection === RotationDirection.Right ? 1 : -1
const direction = (this.facingDirection + delta + count) % count
const direction = (this.facingDirection + delta) % Direction.LENGTH

const adjustPattern =
this.kind === TetriminoKind.Linear ? [0, 1, -1, 2, -2] : [0, 1, -1]
Expand Down

0 comments on commit 9ca290f

Please sign in to comment.