RotationSystem class
Implements the Tetris Guideline Super Rotation System (SRS).
Constructors
- RotationSystem(CollisionSystem _collision)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
detectTSpin(
Tetromino piece, BoardState board, {int kickIndex = 0}) → TSpinType - Classifies a T piece that has just been rotated into place using the Guideline 3-corner rule.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotateCCW(
Tetromino piece, BoardState board) → Tetromino? - Attempts counter-clockwise rotation with SRS wall-kick tests.
-
rotateCW(
Tetromino piece, BoardState board) → Tetromino? - Attempts clockwise rotation with SRS wall-kick tests. Returns the rotated piece or null if no valid kick found.
-
toString(
) → String -
A string representation of this object.
inherited
-
tryRotate(
Tetromino piece, BoardState board, {required bool clockwise}) → ({int kickIndex, Tetromino piece})? - Attempts a rotation and also reports which SRS kick test succeeded (0 = no kick, 4 = the fifth and final test).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited