rotateCW method

Tetromino? rotateCW(
  1. Tetromino piece,
  2. BoardState board
)

Attempts clockwise rotation with SRS wall-kick tests. Returns the rotated piece or null if no valid kick found.

Implementation

Tetromino? rotateCW(Tetromino piece, BoardState board) =>
    tryRotate(piece, board, clockwise: true)?.piece;