Files
BlockSeasons/lib/game/models/cell.dart
T
airkjw 0210c14858 Add pure-Dart engine core: RNG, grid, placement, line clear, scoring, piece generator
PCG32 seeded RNG; immutable 8x8 GridState with occupancy bitmask;
placement legality + anyPlacementExists; simultaneous row/col clears
with single-count gem credit; combo scoring with one-move grace;
weighted-bag generator with pity bias and depth-3 solvability nudge.
All TDD, 51 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 13:05:55 +09:00

23 lines
497 B
Dart

enum CellType { empty, filled, gem }
class Cell {
const Cell(this.type, {this.colorId = 0});
final CellType type;
final int colorId;
static const empty = Cell(CellType.empty);
bool get isOccupied => type != CellType.empty;
@override
bool operator ==(Object other) =>
other is Cell && other.type == type && other.colorId == colorId;
@override
int get hashCode => Object.hash(type, colorId);
@override
String toString() => 'Cell(${type.name}, color: $colorId)';
}