Exemplo n.º 1
0
 public Ambient(int n, int m, double filthPercent, double obstaclePercent, int childrenCount)
 {
     map  = new AmbientBoard(n, m);
     Rows = n; Columns = m;
     initFilthPercentage = filthPercent;
     initObstaPercentage = obstaclePercent;
     initChildCount      = childrenCount;
     SetInitialState(filthPercent, obstaclePercent, childrenCount);
 }
Exemplo n.º 2
0
        private List <(int, int)> GetAvailablePositions(AmbientBoard bmap)
        {
            List <(int, int)> result = new List <(int, int)>();

            for (int i = 0; i < bmap.Rows; i++)
            {
                for (int j = 0; j < bmap.Columns; j++)
                {
                    if (bmap[i, j].elementInside == null)
                    {
                        result.Add((i, j));
                    }
                }
            }
            return(result);
        }
Exemplo n.º 3
0
 public void Reset()
 {
     map = new AmbientBoard(Rows, Columns);
     SetInitialState(initFilthPercentage, initObstaPercentage, initChildCount);
 }