Exemple #1
0
        public SortedSet <CellState> ComputeBottomCells()
        {
            var r    = new SortedSet <CellState>(new CellStatePositionComparer());
            int rowI = CellsMatrix.GetUpperBound(0);

            for (int i = 0; i < ColumnCount; i++)
            {
                int       offset = 0;
                CellState cell   = null;
                while (cell == null)
                {
                    cell = CellsMatrix[rowI - offset, i];
                    offset++;
                }
                r.Add(cell);
            }
            return(r);
        }
Exemple #2
0
        public SortedSet <CellState> ComputeEndCells()
        {
            var r    = new SortedSet <CellState>(new CellStatePositionComparer());
            int colI = CellsMatrix.GetUpperBound(1);

            for (int i = 0; i < RowCount; i++)
            {
                int       offset = 0;
                CellState cell   = null;
                while (cell == null)
                {
                    cell = CellsMatrix[i, colI - offset];
                    offset++;
                }
                r.Add(cell);
            }
            return(r);
        }