// 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; } }