send(connId, createGameSettingsPacket());
send(connId, createPlanetaryConditionsPacket());
Player player = game.getPlayer(connId);
if (null != player) {
send(connId, new Packet(Packet.COMMAND_SENDING_MINEFIELDS, player.getMinefields()));
switch (game.getPhase()) {
case PHASE_LOUNGE:
send(connId, createMapSettingsPacket());
// Send Entities *after* the Lounge Phase Change
send(connId, new Packet(Packet.COMMAND_PHASE_CHANGE, game.getPhase()));
if (doBlind()) {
send(connId, createFilteredFullEntitiesPacket(player));
} else {
send(connId, createFullEntitiesPacket());
}
break;
default:
send(connId, new Packet(Packet.COMMAND_ROUND_UPDATE, new Integer(game.getRoundCount())));
// send(connId, createReportPacket(player));
send(connId, createAllReportsPacket(player));
// Send entities *before* other phase changes.
if (doBlind()) {
send(connId, createFilteredFullEntitiesPacket(player));
} else {
send(connId, createFullEntitiesPacket());
}
player.setDone(game.getEntitiesOwnedBy(player) <= 0);
send(connId, createBoardPacket());
send(connId, new Packet(Packet.COMMAND_PHASE_CHANGE, game.getPhase()));
break;
}
if ((game.getPhase() == IGame.Phase.PHASE_FIRING) || (game.getPhase() == IGame.Phase.PHASE_TARGETING) || (game.getPhase() == IGame.Phase.PHASE_OFFBOARD) || (game.getPhase() == IGame.Phase.PHASE_PHYSICAL)) {
// can't go above, need board to have been sent
send(connId, createAttackPacket(game.getActionsVector(), 0));