roundReport.append((firstTurn ? "" : ", ") ).append( getPlayer(turn.getPlayerNum()).getName()); firstTurn = false;
Player player = getPlayer( turn.getPlayerNum() ); if ( null != player ) { roundReport.append( (firstTurn ? "" : ", ") ) .append( player.getName() ); firstTurn = false; }
    private void writeInitiativeReport() {        // write to report        if ((game.getLastPhase() == Game.PHASE_DEPLOYMENT) || game.isDeploymentComplete() || !game.shouldDeployThisRound()) {            roundReport.append("\nInitiative Phase for Round #").append(game.getRoundCount());        } else {          if ( game.getRoundCount() == 0 ) {            roundReport.append("\nInitiative Phase for Deployment");          } else {            roundReport.append("\nInitiative Phase for Deployment for Round #").append(game.getRoundCount());          }        }        roundReport.append("\n------------------------------\n");        for (Enumeration i = game.getTeams(); i.hasMoreElements();) {            final Team team = (Team)i.nextElement();            // If there is only one player, list them as the 'team', and            // use the team iniative            if (team.getSize() == 1) {                final Player player = (Player)team.getPlayers().nextElement();                roundReport.append(player.getName()).append(" rolls a ").                    append(team.getInitiative().toString()).append(".\n");            } else {                // Multiple players.  List the team, then break it down.                roundReport.append(Player.teamNames[team.getId()]).                    append(" rolls a ").                    append(team.getInitiative().toString()).                    append(".\n");                for( Enumeration j = team.getPlayers(); j.hasMoreElements();) {                    final Player player = (Player)j.nextElement();                    roundReport.append("\t").append(player.getName()).                        append(" rolls a ").                        append(player.getInitiative().toString()).                        append(".\n");                }            }        }        roundReport.append("\nThe turn order is:\n  ");        boolean firstTurn = true;        for (Enumeration i = game.getTurns(); i.hasMoreElements();) {            GameTurn turn = (GameTurn)i.nextElement();            roundReport.append((firstTurn ? "" : ", ") ).append( getPlayer(turn.getPlayerNum()).getName());            firstTurn = false;        }        roundReport.append("\n\n");        roundReport.append("  Wind direction is "+game.getStringWindDirection()+"\n");    }