@SuppressWarnings("unchecked")
    public static ArrayList<Move> findBlackKingMoves(Chessboard board, BlackFinderStrategy strategy) throws ChessboardException {
        ArrayList<Move> moves = board.getAllLegalBlackKingMoves();

        if (moves.size() == 0) { return null; }

        switch (strategy) {
            case RANDOM:
                return moves;
            case CENTER:
                return BlackMoveFinder.findBlackKingCenterMove(moves);
            case PERFECT:
                return BlackMoveFinder.findBlackPerfectMove(board);
            case CUSTOM: { // crni tezi proti centru, toda ce je mozno pa poje
                         // belo
                // figuro, poleg tega se pa tudi izgiba opoziciji kraljev
                ArrayList<Move> blackEats = board.movesWhereBlackKingEatsWhite();
                if (blackEats.size() == 0) {
                    ArrayList<Move> avoidsOpp = board.movesWhereBlackKingEvadesOposition(moves);
                    if (avoidsOpp.size() == 0) {
                        return BlackMoveFinder.findBlackKingCenterMove(moves);
                    }
                    else {
                        return BlackMoveFinder.findBlackKingCenterMove(avoidsOpp);
                    }
                }
                else {
                    return (ArrayList<Move>) blackEats.clone();
                }
            }
            default:
                return null;
        }

    }