src/main/java/com/webcheckers/model/Game.java
/**
     * Checks if jump move is valid
     * @param move
     * @return true if jump move is valid, false otherwise
     */
Checks if jump move is valid
@param move
@return true if jump move is valid, false otherwise
Checks if jump move is valid @param move @return true if jump move is valid false otherwise
public boolean isValidJump(Move move){
        int startRow = move.getStart().getRow();
        int startCol = move.getStart().getCell();
        int endRow = move.getEnd().getRow();
        int endCol = move.getEnd().getCell();
        if (this.getTurn().getNum() > 1){
            if (startRow != this.turn.getRow() || startCol != this.turn.getCol()){
                return false;
            }
        }
        if (Math.abs(startRow - endRow) != 2 || Math.abs(startCol - endCol) != 2){
            return false;
        } else {
            Piece pStart = boardView.getSpace(startRow, startCol).getPiece();
            Piece pEnd = boardView.getSpace(endRow, endCol).getPiece();
            PieceColor curr = pStart.getColor();
            if (pEnd != null){
                return false;
            }
            if (startRow - endRow > 0){
                if (pStart.getType() == Piece.PieceType.KING || pStart.getColor() == PieceColor.RED) {
                    if (startCol - endCol > 0) {
                        return boardView.getSpace(startRow - 1, startCol - 1).getPiece().getColor() != curr;
                    } else {
                        return boardView.getSpace(startRow - 1, startCol + 1).getPiece().getColor() != curr;
                    }
                } else {
                    return false;
                }
            } else {
                if (pStart.getType() == Piece.PieceType.KING || pStart.getColor() == PieceColor.WHITE) {
                    if (startCol - endCol > 0) {
                        return boardView.getSpace(startRow + 1, startCol - 1).getPiece().getColor() != curr;
                    } else {
                        return boardView.getSpace(startRow + 1, startCol + 1).getPiece().getColor() != curr;
                    }
                } else {
                    return false;
                }
            }
        }
    }
public boolean isValidJump ( Move move ) { int startRow = move . getStart ( ) . getRow ( ) ; int startCol = move . getStart ( ) . getCell ( ) ; int endRow = move . getEnd ( ) . getRow ( ) ; int endCol = move . getEnd ( ) . getCell ( ) ; if ( this . getTurn ( ) . getNum ( ) > 1 ) { if ( startRow != this . turn . getRow ( ) || startCol != this . turn . getCol ( ) ) { return false ; } } if ( Math . abs ( startRow - endRow ) != 2 || Math . abs ( startCol - endCol ) != 2 ) { return false ; } else { Piece pStart = boardView . getSpace ( startRow , startCol ) . getPiece ( ) ; Piece pEnd = boardView . getSpace ( endRow , endCol ) . getPiece ( ) ; PieceColor curr = pStart . getColor ( ) ; if ( pEnd != null ) { return false ; } if ( startRow - endRow > 0 ) { if ( pStart . getType ( ) == Piece . PieceType . KING || pStart . getColor ( ) == PieceColor . RED ) { if ( startCol - endCol > 0 ) { return boardView . getSpace ( startRow - 1 , startCol - 1 ) . getPiece ( ) . getColor ( ) != curr ; } else { return boardView . getSpace ( startRow - 1 , startCol + 1 ) . getPiece ( ) . getColor ( ) != curr ; } } else { return false ; } } else { if ( pStart . getType ( ) == Piece . PieceType . KING || pStart . getColor ( ) == PieceColor . WHITE ) { if ( startCol - endCol > 0 ) { return boardView . getSpace ( startRow + 1 , startCol - 1 ) . getPiece ( ) . getColor ( ) != curr ; } else { return boardView . getSpace ( startRow + 1 , startCol + 1 ) . getPiece ( ) . getColor ( ) != curr ; } } else { return false ; } } } }
Checks if jump move is valid
 @param move
 @return true if jump move is valid, false otherwise
Checks if jump move is valid @param move @return true if jump move is valid false otherwise