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.


Constructor Summary
TransformationPlyImpl(Position source, Position destination, byte pieceType)
          Create a new transformation ply instance.
 
Method Summary
 byte getTypeAfterTransformation()
          Get the new type of the piece after the transformation.
 void setTypeAfterTransformation(byte pieceType)
          Set the new piece type after the transformation.
 
Methods inherited from class de.java_chess.javaChess.ply.PlyImpl
equals, getDestination, getSource, setDestination, setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.