de.java_chess.javaChess.ply
Class TransformationPlyImpl
java.lang.Object
|
+--de.java_chess.javaChess.ply.PlyImpl
|
+--de.java_chess.javaChess.ply.TransformationPlyImpl
- public class TransformationPlyImpl
- extends PlyImpl
- implements TransformationPly
This class is for pawn plies, that reach the last row
and transform into a new piece type.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
TransformationPlyImpl
public TransformationPlyImpl(Position source,
Position destination,
byte pieceType)
- Create a new transformation ply instance.
- Parameters:
source
- The source square.destination
- The destination square.pieceType
- The piece type after the transformation.
getTypeAfterTransformation
public final byte getTypeAfterTransformation()
- Get the new type of the piece after the transformation.
- Specified by:
- getTypeAfterTransformation in interface TransformationPly
- Returns:
- The new piece after the transformation.
setTypeAfterTransformation
public final void setTypeAfterTransformation(byte pieceType)
- Set the new piece type after the transformation.
- Specified by:
- setTypeAfterTransformation in interface TransformationPly
- Parameters:
pieceType
- The new piece type after the transformation.