private void handleBattleFeedback(BattleFeedbackEnum feedback, Player attacker, Player defender, boolean aiFeedback) {
        switch (feedback) {
        case SHIP_DESTROYED:
            attacker.getShip().restoreAllComponents();
            endBattle();
            playerKilled(defender);
            attacker.getWallet().addCredits(2000);
            if (aiFeedback) {
                gui.displayLoss();
            } else {
                gui.displayStatus(attacker);
                gui.displayBattleFeedback(feedback);
            }
            break;
        case COMPONENT_DAMAGE:
            gui.displayBattleFeedback(feedback);
            break;
        case COMPONENT_REPAIR:
            gui.displayBattleFeedback(feedback);
            break;
        case SHIELD_HIT:
            gui.displayBattleFeedback(feedback);
            break;
        case SHIELD_RECHARGE:
            gui.displayBattleFeedback(feedback);
            break;
        case ESCAPE:
            attacker.getShip().restoreAllComponents();
            defender.getShip().restoreAllComponents();
            endBattle();
            gui.displayStatus(attacker);
            gui.displayBattleFeedback(feedback);
            break;
        }

        if (state == GameState.BATTLE && aiFeedback) {
            continueBattle(defender);
        }
    }