Returns a copy of the piece type with value.
value
PieceType withValue(int value) => copyWith(value: value);