if (IGame.PHASE_DEPLOYMENT == m_game.getPhase() && m_game.getTurn().getPlayerNum() == m_client.getLocalPlayer().getId()) { for (int j = 0; j < m_game.getBoard().getWidth(); j++) { for (int k = 0; k < m_game.getBoard().getHeight(); k++) { if (m_game.getBoard().isLegalDeployment(new Coords(j,k), m_client.getLocalPlayer())) { paintSingleCoordBorder(g,j,k,Color.yellow);
if (IGame.PHASE_DEPLOYMENT == m_game.getPhase()) { GameTurn turn = m_game.getTurn(); if (turn != null && turn.getPlayerNum() == m_client.getLocalPlayer().getId()) { for (int j = 0; j < m_game.getBoard().getWidth(); j++) { for (int k = 0; k < m_game.getBoard().getHeight(); k++) { if (m_game.getBoard().isLegalDeployment(new Coords(j,k), m_client.getLocalPlayer())) { paintSingleCoordBorder(g,j,k,Color.yellow); }
    public synchronized void drawMap() {        if (m_mapImage == null) {            return;        }        if ( !m_dialog.isVisible() )            return;        Graphics g = m_mapImage.getGraphics();        Color oldColor = g.getColor();        g.setColor(BACKGROUND);        g.fillRect(0,0,getSize().width,getSize().height);        g.setColor(oldColor);        if (!minimized) {            roadHexIndexes.removeAllElements();            for (int j = 0; j < m_game.getBoard().getWidth(); j++) {                for (int k = 0; k < m_game.getBoard().getHeight(); k++) {                    IHex h = m_game.getBoard().getHex(j, k);                    g.setColor(terrainColor(h, j, k));                    paintCoord(g, j, k, true);                }            }            if (firstLOS != null) paintSingleCoordBorder(g, firstLOS.x, firstLOS.y, Color.red);            if (secondLOS != null) paintSingleCoordBorder(g, secondLOS.x, secondLOS.y, Color.red);            if (! roadHexIndexes.isEmpty()) paintRoads(g);            if (SHOW_NO_HEIGHT!=heightDisplayMode) {                for (int j = 0; j < m_game.getBoard().getWidth(); j++) {                    for (int k = 0; k < m_game.getBoard().getHeight(); k++) {                        IHex h = m_game.getBoard().getHex(j, k);                        paintHeight(g, h, j , k);                    }                }            }            // draw Drop Zone            if (null!=m_client && null!=m_game) {   // sanity check!                if (IGame.PHASE_DEPLOYMENT == m_game.getPhase()                    && m_game.getTurn().getPlayerNum() == m_client.getLocalPlayer().getId()) {                    for (int j = 0; j < m_game.getBoard().getWidth(); j++) {                        for (int k = 0; k < m_game.getBoard().getHeight(); k++) {                            if (m_game.getBoard().isLegalDeployment(new Coords(j,k), m_client.getLocalPlayer())) {                                paintSingleCoordBorder(g,j,k,Color.yellow);                            }                        }                    }                }            }            // draw declared fire            if (IGame.PHASE_FIRING==m_game.getPhase() || IGame.PHASE_PHYSICAL==m_game.getPhase()) {                for (Enumeration iter = m_game.getActions(); iter.hasMoreElements(); ) {                    Object action = iter.nextElement();                    if (action instanceof AttackAction) {                        paintAttack(g,(AttackAction) action);                    };                };            };            for (Enumeration iter = m_game.getEntities(); iter.hasMoreElements(); ) {                Entity e = (Entity)iter.nextElement();                if (e.getPosition() == null) continue;                paintUnit(g, e, true);            }        }        drawBtn(g);        repaint();    }