Exemplo n.º 1
0
        void MarkColumnSolvedForValue(int StartOfColumnIndex, int Value)
        {
            for (int i = 0; i < ROWS; i++)
            {
                int idx = StartOfColumnIndex + i * COLS;

                CellHashset Cell;
                if (_Cells.TryGetValue(idx, out Cell))
                {
                    Cell.MarkValueSolvedInOtherCell(Value);
                }
            }
        }
Exemplo n.º 2
0
        void MarkQuadrantSolvedForValue(int StartOfQuadrantIndex, int Value)
        {
            for (int i = 0; i < QUAD_CELLS; i++)
            {
                int idx = StartOfQuadrantIndex + i % QUAD_COLS + (int)Math.Floor((double)(i / QUAD_COLS)) * COLS;

                CellHashset Cell;
                if (_Cells.TryGetValue(idx, out Cell))
                {
                    Cell.MarkValueSolvedInOtherCell(Value);
                }
            }
        }
Exemplo n.º 3
0
        void MarkRowSolvedForValue(int StartOfRowIndex, int Value)
        {
            for (int i = 0; i < COLS; i++)
            {
                int idx = StartOfRowIndex + i;

                CellHashset Cell;
                if (_Cells.TryGetValue(idx, out Cell))
                {
                    Cell.MarkValueSolvedInOtherCell(Value);
                }
            }
        }