public void draw(Graphics g, ImageObserver o) {
        // background
        for (int y = 0; y < height; y++)
            for (int x = 0; x < width; x++)
                drawMapChip(background, x, y, g, o);

        // middleground
        if (events.isEmpty()) {
            for (int y = 0; y < height; y++)
                for (int x = 0; x < width; x++)
                    drawMapChip(middleground, x, y, g, o);
        } else {
            drawEvent(g, o);
        }

        // foreground
        for (int y = 0; y < height; y++)
            for (int x = 0; x < width; x++)
                drawMapChip(foreground, x, y, g, o);
    }