private List<Cell> getSurroundingCells(Cell cell) {
        List<Cell> surrounding = new LinkedList<Cell>();
        final int x = cell.x;
        final int y = cell.y;

        if (cell.x > 0) {
            surrounding.add(cells[x - 1][y]);
            if (cell.y > 0)
                surrounding.add(cells[x - 1][y - 1]);
            if (cell.y < yCells - 1)
                surrounding.add(cells[x - 1][y + 1]);
        }
        if (cell.x < xCells - 1) {
            surrounding.add(cells[x + 1][y]);
            if (cell.y < yCells - 1)
                surrounding.add(cells[x + 1][y + 1]);
            if (cell.y > 0)
                surrounding.add(cells[x + 1][y - 1]);
        }
        if (cell.y > 0)
            surrounding.add(cells[x][y - 1]);
        if (cell.y < yCells - 1)
            surrounding.add(cells[x][y + 1]);

        return surrounding;
    }