@@ -0,0 +1,1626 @@
+package ru.sbulygin.chees;%0A%0Aimport ru.sbulygin.exeptions.ImpossibleMoveException;%0A%0Aimport static ru.sbulygin.chees.Cell.getObjectCell;%0A%0A/**%0A * Class Horse.%0A *%0A * @author ru.sbulygin.start.%0A * @since 15.03.2017.%0A * @version 1.0.%0A */%0Apublic class Horse extends Figure %7B%0A    /**%0A     * An array field of the movement of an horse.%0A     */%0A    private Cell%5B%5D direction = new Cell%5B2%5D;%0A    /**%0A     * Place the coordinates in the array.%0A     */%0A    private int spot = 0;%0A%0A    /**%0A     * The constructor of the Horse class generates the class object.%0A     * @param position position of the figure on the Board.%0A     */%0A    public Horse(Cell position) %7B%0A        super(position);%0A    %7D%0A%0A    /**%0A     * Way overridden method of the abstract class Figure.%0A     * @param distance the specified cell on the Board.%0A     * @return array of the path of movement of the horse.%0A     * @throws ImpossibleMoveException error of the impossibility of motion horse.%0A     */%0A    @Override%0A    public Cell%5B%5D way(Cell distance) throws ImpossibleMoveException %7B%0A%0A        int posX = getPosition().getPivotX();%0A        int posY = getPosition().getPivotY();%0A        int distX = distance.getPivotX();%0A        int distY = distance.getPivotY();%0A%0A        int vectorX = Math.abs(distX - posX);%0A        int vectorY = Math.abs(distY - posY);%0A%0A        if (vectorX + vectorY == 3 && posX != distX && posY != distY) %7B%0A            direction%5Bspot++%5D = getObjectCell(posX, distX);%0A            direction%5Bspot++%5D = getObjectCell(posY, distY);%0A        %7D else %7B%0A            throw new ImpossibleMoveException(%22Horse can't walk.%22);%0A        %7D%0A        return direction;%0A    %7D%0A%7D%0A

add Horse class