@Override
    public void mousePressed(MouseEvent e) {
        if (animating) {
            return;
        }
        Cell cell = getCellAt(e.getX(), e.getY());
        if (cell != null) {
            cell.setAlive(true);
        }
    }