protected void clearScanner() {
        player.ship.scanTarget = null;

        for (int x = 3; x < 17; x++) {
            drawScannerLine(x, TrekAnsi.eraseToEndOfLine(player));
        }

        hudobjects.remove("ScanPhasers");
        hudobjects.remove("ScanDamage");
        hudobjects.remove("ScanTorpedoes");
        hudobjects.remove("ScanDamageControl");
        hudobjects.remove("ScanHudX");
        hudobjects.remove("ScanHudX2");
        hudobjects.remove("ScanHudY");
        hudobjects.remove("ScanHudY2");
        hudobjects.remove("ScanHudZ");
        hudobjects.remove("ScanHudZ2");

        for (int x = 3; x < 14; x++) {
            hudobjects.remove("MyScannerLine" + x);
        }
    }