Refactor name getPiece to getPiecePtr