Move constructor

Move({
  1. required int from,
  2. required int to,
  3. String? promo,
  4. String? piece,
  5. int? gatingSquare,
})

Implementation

Move({
  required this.from,
  required this.to,
  this.promo,
  this.piece,
  this.gatingSquare,
}) {
  if (from == HAND) assert(piece != null, 'Drop moves require a piece');
}