checkFor20Damage(); resolveCrewDamage(); resolvePilotingRolls(); resolveCrewDamage(); applyBuildingDamage();
    private void endCurrentPhase() {        switch (game.getPhase()) {            case Game.PHASE_LOUNGE :                changePhase(Game.PHASE_EXCHANGE);                break;            case Game.PHASE_EXCHANGE :            case Game.PHASE_STARTING_SCENARIO :            	Enumeration e = game.getPlayers();            	boolean mines = false;            	while (e.hasMoreElements()) {            		Player p = (Player) e.nextElement();            		if (p.hasMinefields()) {            			mines = true;            		}            	}            	if (mines) {                	changePhase(Game.PHASE_DEPLOY_MINEFIELDS);                } else {	               	changePhase(Game.PHASE_INITIATIVE);                }                break;            case Game.PHASE_DEPLOY_MINEFIELDS :                changePhase(Game.PHASE_INITIATIVE);                break;            case Game.PHASE_DEPLOYMENT :                game.clearDeploymentThisRound();                game.checkForCompleteDeployment();                changePhase(Game.PHASE_INITIATIVE);                break;            case Game.PHASE_INITIATIVE :                boolean doDeploy = game.shouldDeployThisRound() && (game.getLastPhase() != Game.PHASE_DEPLOYMENT);                if ( doDeploy ) {                  changePhase(Game.PHASE_DEPLOYMENT);                } else {                  changePhase(Game.PHASE_TARGETING);                }                break;            case Game.PHASE_MOVEMENT :                addMovementHeat();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls(); // Skids cause damage in movement phase                resolveCrewDamage(); // again, I guess                checkForFlamingDeath();                applyBuildingDamage();                // check phase report                if (phaseReport.length() > 0) {                    roundReport.append(phaseReport.toString());                    changePhase(Game.PHASE_MOVEMENT_REPORT);                } else {                    roundReport.append("<nothing>\n");                    changePhase(Game.PHASE_OFFBOARD);                }                break;            case Game.PHASE_MOVEMENT_REPORT :                changePhase(Game.PHASE_OFFBOARD);                break;            case Game.PHASE_FIRING :                resolveAllButWeaponAttacks();                assignAMS();                resolveOnlyWeaponAttacks();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls();                resolveCrewDamage(); // again, I guess                applyBuildingDamage();                // check phase report                if (phaseReport.length() > 0) {                    roundReport.append(phaseReport.toString());                    changePhase(Game.PHASE_FIRING_REPORT);                } else {                    roundReport.append("<nothing>\n");                    changePhase(Game.PHASE_PHYSICAL);                }                break;            case Game.PHASE_FIRING_REPORT :                changePhase(Game.PHASE_PHYSICAL);                break;            case Game.PHASE_PHYSICAL :                resolvePhysicalAttacks();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls();                resolveCrewDamage(); // again, I guess                applyBuildingDamage();                // check phase report                if (phaseReport.length() > 0) {                    roundReport.append(phaseReport.toString());                } else {                    roundReport.append("<nothing>\n");                }                changePhase(Game.PHASE_END);                break;            case Game.PHASE_TARGETING :                enqueueIndirectArtilleryAttacks();                changePhase(Game.PHASE_MOVEMENT);                break;            case Game.PHASE_OFFBOARD :                roundReport.append("\nOffboard Attack Phase\n-----------------\n");                resolveIndirectArtilleryAttacks();                if (phaseReport.length() > 0) {                    roundReport.append(phaseReport.toString());                    changePhase(Game.PHASE_OFFBOARD_REPORT);                } else {                    roundReport.append("<nothing>\n");                    changePhase(Game.PHASE_FIRING);                }                break;            case Game.PHASE_OFFBOARD_REPORT:                changePhase(Game.PHASE_FIRING);                break;            case Game.PHASE_END :                if (victory()) {                    changePhase(Game.PHASE_VICTORY);                } else {                  changePhase(Game.PHASE_INITIATIVE);                }                break;            case Game.PHASE_VICTORY :                resetGame();                break;        }    }