BoardState class
The immutable state of the Tetris board grid.
Constructors
-
BoardState({required int rows, required int cols, List<
List< ? grid})Cell> > -
BoardState.fromJson(Map<
String, dynamic> json) -
factory
Properties
Methods
-
cellAt(
int row, int col) → Cell -
clearLines(
) → (BoardState, int) - Returns a new board with completed rows cleared, and the count cleared.
-
copyWith(
{List< List< ? grid}) → BoardStateCell> > -
isRowFull(
int row) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
withPieceLocked(
Tetromino piece) → BoardState - Returns a new board with the given tetromino locked in.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited