private void setupReportTabs(Client c) { JTabbedPane tabs = new JTabbedPane(); int numRounds = c.getGame().getRoundCount(); for (int round = 1; round < numRounds; round++) { String text = c.receiveReport(c.getGame().getReports(round)); JTextPane ta = new JTextPane(); setupStylesheet(ta); ta.setText("<pre>" + text + "</pre>"); ta.setEditable(false); ta.setOpaque(false); tabs.add("Round " + round, new JScrollPane(ta)); } // add the new current phase tab JTextPane ta = new JTextPane(); setupStylesheet(ta); ta.setText("<pre>" + c.roundReport + "</pre>"); ta.setEditable(false); ta.setOpaque(false); JScrollPane sp = new JScrollPane(ta); tabs.add("Phase", sp); tabs.setSelectedComponent(sp); getContentPane().add(BorderLayout.CENTER, tabs); }
e.setOwner(c.getLocalPlayer()); if (c.getGame().getPhase() != Phase.PHASE_LOUNGE){ e.setDeployRound(c.getGame().getRoundCount()+1); e.setGame(c.getGame());
} else if (!entity.isDeployed()) { int roundsLeft = entity.getDeployRound() - clientgui.getClient().getGame().getRoundCount(); if (roundsLeft > 0) { printLine(graph, x + 25, y + 28, Integer.toString(roundsLeft));
@Override public void gamePhaseChange(GamePhaseChangeEvent e) { // Are we ignoring events? if (isIgnoringEvents()) { return; } setReportTab(clientgui.getClient().getGame().getRoundCount(), clientgui.getClient().roundReport, clientgui.getClient().phaseReport); resetButtons(); rerolled = false; SwingUtilities.invokeLater(new Runnable() { public void run() { int phaseTab = tabs.indexOfTab("Phase"); if (phaseTab > 0) { JViewport vp = ((JScrollPane) tabs.getComponentAt(phaseTab - 1)).getViewport(); vp.setViewPosition(new Point()); } JViewport vp = ((JScrollPane) tabs.getComponentAt(phaseTab)).getViewport(); vp.setViewPosition(new Point()); } }); }
@Override void doEndPhaseChanges(Vector<Report> vPhaseReport) { if (elevators == null || server.getGame().getRoundCount() == 1) { elevators = new ElevatorInfo[6]; for (int i = 0; i < 6; i++) {
entity.setOwner(player); if (reinforce) { entity.setDeployRound(client.getGame().getRoundCount()+1); entity.setGame(client.getGame());
e.setOwner(c.getLocalPlayer()); if (c.getGame().getPhase() != Phase.PHASE_LOUNGE){ e.setDeployRound(c.getGame().getRoundCount()+1); e.setGame(c.getGame());
if (shdList != null) { for (SpecialHexDisplay shd : shdList) { if (shd.drawNow(game.getPhase(), game.getRoundCount(), localPlayer)) { scaledImage = getScaledImage(shd.getType()
@Override public void doEndPhaseChanges(Vector<Report> vPhaseReport) { if (geysers == null || server.getGame().getRoundCount() == 1) { geysers = new Vector<GeyserInfo>(); findGeysers();
.getSpecialHexDisplay(mcoords); final Phase currPhase = game.getPhase(); int round = game.getRoundCount(); if (shdList != null) { boolean isHexAutoHit = localPlayer.getArtyAutoHitHexes().contains(
&& en.isActive() && (client.getGame().getOptions().intOption(OptionsConstants.BASE_DUMPING_FROM_ROUND) <= client.getGame().getRoundCount()) && !carryingBAsOnBack && !invalidEnvironment) { m_bDumpAmmo.setEnabled(true); m_bDumpAmmo.setEnabled(true); int round = client.getGame().getRoundCount(); boolean inSquadron = ((en instanceof Aero) && ((Aero) en) .isInASquadron());
ce().unload(other); other.setTransportId(Entity.NONE); other.newRound(client.getGame().getRoundCount()); loaded.setTransportId(Entity.NONE); loaded.newRound(clientgui.getClient().getGame() .getRoundCount()); clientgui.mechD.displayEntity(ce());
+ (game.getRoundCount() + aaa.getTurnsTilHit()) + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName(); new SpecialHexDisplay( SpecialHexDisplay.Type.ARTILLERY_INCOMING, game .getRoundCount() + aaa.getTurnsTilHit(), game.getPlayer(aaa.getPlayerId()), artyMsg, SpecialHexDisplay.SHD_OBSCURED_TEAM)); artyMsg = "Artillery hit here on round " + game.getRoundCount() + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName() + " (this hex is now an auto-hit)"; targetPos, new SpecialHexDisplay(SpecialHexDisplay.Type.ARTILLERY_HIT, game.getRoundCount(), game.getPlayer(aaa .getPlayerId()), artyMsg)); r = new Report(3195); artyMsg = "Artillery missed here on round " + game.getRoundCount() + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName(); game.getBoard().addSpecialHexDisplay( new SpecialHexDisplay( SpecialHexDisplay.Type.ARTILLERY_HIT, game .getRoundCount(), game .getPlayer(aaa.getPlayerId()),
+ (game.getRoundCount() + aaa.getTurnsTilHit()) + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName(); new SpecialHexDisplay( SpecialHexDisplay.Type.ARTILLERY_INCOMING, game .getRoundCount() + aaa.getTurnsTilHit(), game.getPlayer(aaa.getPlayerId()), artyMsg, SpecialHexDisplay.SHD_OBSCURED_TEAM)); artyMsg = "Artillery hit here on round " + game.getRoundCount() + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName() + " (this hex is now an auto-hit)"; targetPos, new SpecialHexDisplay(SpecialHexDisplay.Type.ARTILLERY_HIT, game.getRoundCount(), game.getPlayer(aaa .getPlayerId()), artyMsg)); r = new Report(3195); artyMsg = "Artillery missed here on round " + game.getRoundCount() + ", fired by " + game.getPlayer(aaa.getPlayerId()).getName(); game.getBoard().addSpecialHexDisplay( new SpecialHexDisplay( SpecialHexDisplay.Type.ARTILLERY_HIT, game .getRoundCount(), game .getPlayer(aaa.getPlayerId()),
phaseReport = receiveReport((Vector<Report>) c.getObject(0)); if (keepGameLog()) { if ((log == null) && (game.getRoundCount() == 1)) { initGameLog(); roundReport = receiveReport(game.getReports(game.getRoundCount())); if (c.getCommand() == Packet.COMMAND_SENDING_REPORTS_TACTICAL_GENIUS) { game.processGameEvent(new GameReportEvent(this, roundReport)); roundReport = receiveReport(game.getReports(game.getRoundCount()));
int distance = Compute.effectiveDistance(game,this,e,false); if (game.getRoundCount() > 0) { if (distance > 60) { return false;
ce().unload(other); other.setTransportId(Entity.NONE); other.newRound(client.getGame().getRoundCount());