public void drawBackground(Graphics g) {
    // draw the background graphics from the superclass
    super.drawBackground(g);

    ImageManager im = ImageManager.getSingleton();
    Image img;
    Position p;
    
    // draw the map as a matrix of tiles with cities on top
    for ( int r = 0; r < GameConstants.WORLDSIZE; r++ ) {
      for ( int c = 0; c < GameConstants.WORLDSIZE; c++ ) {
        p = new Position(r,c);
        int xpos = GfxConstants.getXFromColumn(c);
        int ypos = GfxConstants.getYFromRow(r);
        // Draw proper terrain
        Tile t = game.getTileAt(p);
        if(t == null) continue;
        String image_name = t.getTypeString();
        // special handling of ocean coasts
        if ( image_name == GameConstants.OCEANS ) {
          image_name = image_name + 
            MapAlgorithms.getCoastlineCoding(game, p );
        }
        img = im.getImage( image_name );
        g.drawImage( img, xpos, ypos, null );
      }
    }
  }