Ejemplo n.º 1
0
 // Set the input square to an exact copy of this square.
 public void Copy(Square oldSquare)
 {
     posX       = oldSquare.posX;
     posY       = oldSquare.posY;
     whiteCover = oldSquare.whiteCover;
     blackCover = oldSquare.blackCover;
     if (oldSquare.piece != null)
     {
         piece = oldSquare.piece.getCopyPiece();
         piece.Copy(oldSquare.piece);
     }
     else
     {
         piece = null;
     }
 }
Ejemplo n.º 2
0
 // Set the input square to an exact copy of this square.
 public void Copy(Square oldSquare)
 {
     posX = oldSquare.posX;
     posY = oldSquare.posY;
     whiteCover = oldSquare.whiteCover;
     blackCover = oldSquare.blackCover;
     if (oldSquare.piece != null)
     {
         piece = oldSquare.piece.getCopyPiece();
         piece.Copy(oldSquare.piece);
     }
     else
     {
         piece = null;
     }
 }