Question on PieceType

Hi everyone,

When I’m trying to implement public PieceType getPieceType(), even though I return a variable of enum PieceType, I get an error, says that the return type is incompatible with the Piece.getPieceType().
Should I create a class PieceType and then implement it or how could I solve this ?

Thanks in advance

it is not necessary to create a PieceType class for this method. You also don’t need to copy the enum or something, instead simply import and use the already provided enum, otherwise these might be two seperate types.
Let me know if this fixed your problem or if you need any further help.


yes, this fixed my problem.

Thanks a lot,

1 Like