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) {
  final rotated = piece.rotatedCW();
  return _tryKicks(piece, rotated, board, clockwise: true);
}