@Override
    public void mousePressed(MouseEvent evt) {
        // Don't process event, if listener has inactive state
        if (!userLogic.isActive()) {
            return;
        }

        Cell clickedCell = chessBoard.getCellByCoordinates(evt.getX(), evt.getY());

        // Right-button mouse click - deactivates any active checker
        if (evt.getButton() == MouseEvent.BUTTON3) {
            resetActiveCell();
            return;
        }

        if (clickedCell == null || clickedCell.hasOpponentChecker()) {
            return;
        }

        if (evt.getButton() == MouseEvent.BUTTON1) {
            // set active cell (if cell is not active yet)
            if (!hasActiveChecker() || clickedCell.hasUserChecker()) {
                setActiveCell(clickedCell);
                return;
            }

            // If was click on active checker - it becomes deactivated
            if (getActiveCell() == clickedCell) {
                resetActiveCell();
                return;
            }

            // We activated checker, so second click selects target cell
            userLogic.addClickedCell(getActiveCell());
            userLogic.addClickedCell(clickedCell);
            setActiveCell(clickedCell);
        }
    }