Can pieces follow different paths from one square to another in a single move? I am implementing a chess game. I am aware of the rules but I have not played it much. I need clarification on a small point.
Suppose a player legally moves a piece from square A to square B. Consider the path this piece followed during this move. Can it be different based on the type of piece?
I am not able to find such a case.
Edit :- I am adding the interface code that I am dealing with to make it more clear as asked by some people to give more context.
public class Chess {

    ChessBoard chessBoard;
    Player[] player;
    Player currentPlayer;
    List&lt;Move&gt; movesList;
    GameStatus gameStatus;

    public boolean playerMove(CellPosition fromPosition, CellPositionb toPosition, Piece piece); 
    public boolean endGame();
    private void changeTurn();

}
public abstract class Piece {

Color color;
public boolean validate(CellPosition fromPosition, CellPositionb toPosition);
}

public class Knight extends Piece {
public boolean validate(CellPosition fromPosition, CellPositionb toPosition);

}

Similarly there will be classes for other pieces as Knight. Now if a player want to move in chess from some position X to another position Y, the validate() method of the Piece will be called by playerMove() of chess,validate() can only check whether the move is valid or not.Like for the given pieces,say knight, it will check that from given location,the destination is one of 8 valid moves.For Rook it can be any one of four directions and so on.
The playerMove() function makes a call the the Piece.validate() function and then it gets to know that it is a valid move.The problem that I am trying to address, now once playerMove function in chess, knows that it is valid move, it does not know that whether there is any piece in between from given location to destination?Because the piece dont have context of Board,it cannot detect it thing and it has to be done in playerMove() function of chess.So i will write a code here to generate the list of possible squares that are involved from source to destination. Will that list of squares will always be unique ?or can it be different for diffeent piece? Because apart from knight ,all moves in straight or diagonal so it should be unique ,so I want to clarify on this .If still question not clear, please let me know.but
For queens, bishops and rooks moving from square A to square B there is only one way that move can be made and all the squares in between must be empty for that move to be legal.
For a knight moving from square A to square there are generally two ways but that is irrelevant because knights can jump over pieces in the way.
For castling there is only one way the king can move from A to B and the intervening square must be empty for that move to be legal and the king must be moved first. For castling there is only one way the rook can move from A to B and all the squares in between must be empty apart from the king for that move to be legal.