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)';
}
