Replace abstract class `Piece` with trait