@Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        calcCellSize();
        if (antSim == null) {
            return;
        }
        for (int x = 0; x < antSim.getWidth(); x++) {
            for (int y = 0; y < antSim.getHeight(); y++) {
                if (map[x][y] == 1) {
                    g.setColor(Color.BLACK);
                } else {
                    g.setColor(Color.GRAY);
                }
                g.fillRect(x * cellSize, y * cellSize, cellSize, cellSize);
            }
        }
        for (Ant ant : antSim.getAnts()) {
            g.setColor(ANT_COLOR);
            g.fillRect(ant.getPos().getX() * cellSize, ant.getPos().getY() * cellSize, cellSize, cellSize);
        }

    }