changePhase(IGame.PHASE_INITIATIVE);
if (victory()) { changePhase(IGame.PHASE_VICTORY); } else { changePhase(IGame.PHASE_INITIATIVE); }
    private void endCurrentPhase() {        switch (game.getPhase()) {            case IGame.PHASE_LOUNGE :                changePhase(IGame.PHASE_EXCHANGE);                break;            case IGame.PHASE_EXCHANGE :                changePhase(IGame.PHASE_SET_ARTYAUTOHITHEXES);                break;            case IGame.PHASE_STARTING_SCENARIO :                changePhase(IGame.PHASE_SET_ARTYAUTOHITHEXES);                break;            case IGame.PHASE_SET_ARTYAUTOHITHEXES :                Enumeration e = game.getPlayers();                boolean mines = false;                while (e.hasMoreElements()) {                    Player p = (Player) e.nextElement();                    if (p.hasMinefields()) {                         mines = true;                    }                }                if (mines) {                    changePhase(IGame.PHASE_DEPLOY_MINEFIELDS);                } else {                    changePhase(IGame.PHASE_INITIATIVE);                }                break;            case IGame.PHASE_DEPLOY_MINEFIELDS :                changePhase(IGame.PHASE_INITIATIVE);                break;            case IGame.PHASE_DEPLOYMENT :                game.clearDeploymentThisRound();                game.checkForCompleteDeployment();                changePhase(IGame.PHASE_INITIATIVE);                break;            case IGame.PHASE_INITIATIVE :                game.addReports(vPhaseReport);                changePhase(IGame.PHASE_INITIATIVE_REPORT);                break;            case IGame.PHASE_INITIATIVE_REPORT :                //boolean doDeploy = game.shouldDeployThisRound() && (game.getLastPhase() != IGame.PHASE_DEPLOYMENT);                if ( game.shouldDeployThisRound() ) {                    changePhase(IGame.PHASE_DEPLOYMENT);                } else {                    changePhase(IGame.PHASE_TARGETING);                }                break;            case IGame.PHASE_MOVEMENT :                addMovementHeat();                applyBuildingDamage();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls(); // Skids cause damage in movement phase                resolveCrewDamage(); // again, I guess                checkForFlamingDeath();                // check phase report                if (vPhaseReport.size() > 1) {                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_MOVEMENT_REPORT);                } else {                    //just the header, so we'll add the <nothing> label                    vPhaseReport.addElement(new Report(1205, Report.PUBLIC));                    game.addReports(vPhaseReport);                    sendReport();                    changePhase(IGame.PHASE_OFFBOARD);                }                break;            case IGame.PHASE_MOVEMENT_REPORT :                changePhase(IGame.PHASE_OFFBOARD);                break;            case IGame.PHASE_FIRING :                resolveAllButWeaponAttacks();                assignAMS();                resolveOnlyWeaponAttacks();                applyBuildingDamage();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls();                resolveCrewDamage(); // again, I guess                // check phase report                if (vPhaseReport.size() > 1) {                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_FIRING_REPORT);                } else {                    //just the header, so we'll add the <nothing> label                    vPhaseReport.addElement(new Report(1205, Report.PUBLIC));                    sendReport();                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_PHYSICAL);                }                break;            case IGame.PHASE_FIRING_REPORT :                changePhase(IGame.PHASE_PHYSICAL);                break;            case IGame.PHASE_PHYSICAL :                resolvePhysicalAttacks();                applyBuildingDamage();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls();                resolveCrewDamage(); // again, I guess                resolveSinkVees();                // check phase report                if (vPhaseReport.size() > 1) {                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_PHYSICAL_REPORT);                } else {                    //just the header, so we'll add the <nothing> label                    vPhaseReport.addElement(new Report(1205, Report.PUBLIC));                    game.addReports(vPhaseReport);                    sendReport();                    changePhase(IGame.PHASE_END);                }                break;            case IGame.PHASE_PHYSICAL_REPORT :                changePhase(IGame.PHASE_END);                break;            case IGame.PHASE_TARGETING :                enqueueIndirectArtilleryAttacks();                changePhase(IGame.PHASE_MOVEMENT);                break;            case IGame.PHASE_OFFBOARD :                //write Offboard Attack Phase header                vPhaseReport.addElement(new Report(1100, Report.PUBLIC));                resolveAllButWeaponAttacks(); //torso twist or flip arms possible                resolveOnlyWeaponAttacks(); //should only be TAG at this point                resolveIndirectArtilleryAttacks();                applyBuildingDamage();                checkFor20Damage();                resolveCrewDamage();                resolvePilotingRolls();                resolveCrewDamage(); // again, I guess                //check reports                if (vPhaseReport.size() > 1) {                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_OFFBOARD_REPORT);                } else {                    //just the header, so we'll add the <nothing> label                    vPhaseReport.addElement(new Report(1205, Report.PUBLIC));                    game.addReports(vPhaseReport);                    sendReport();                    changePhase(IGame.PHASE_FIRING);                }                break;            case IGame.PHASE_OFFBOARD_REPORT:                changePhase(IGame.PHASE_FIRING);                break;            case IGame.PHASE_END :                // check phase report                //HACK: hardcoded message ID check                if (vPhaseReport.size() > 3                    || ((Report)vPhaseReport.elementAt(1)).messageId != 1205) {                    game.addReports(vPhaseReport);                    changePhase(IGame.PHASE_END_REPORT);                } else {                    //just the heat and end headers, so we'll add                    // the <nothing> label                    vPhaseReport.addElement(new Report(1205, Report.PUBLIC));                    game.addReports(vPhaseReport);                    sendReport();                    changePhase(IGame.PHASE_INITIATIVE);                }                break;            case IGame.PHASE_END_REPORT :                if (victory()) {                    changePhase(IGame.PHASE_VICTORY);                } else {                    changePhase(IGame.PHASE_INITIATIVE);                }                break;            case IGame.PHASE_VICTORY :                resetGame();                break;        }    }