Exemplo n.º 1
0
    private void SwapRows(int seed)
    {
        int counter = seed;

        while (counter >= 0)
        {
            int regionRow = Random.Range(0, gridHeight);
            int row1      = Random.Range(0, grid[regionRow, 0].GetLength(0));
            int row2      = Random.Range(0, grid[regionRow, 0].GetLength(0));
            if (row1 != row2)
            {
                shuffler.SwapRowsInArea(regionRow, row1, row2);
                counter--;
            }
        }
    }