Exemplo n.º 1
0
        internal void UpdateRow(byte col, byte row)
        {
            Cell cell          = GetCell(col, row);
            char UpdateContent = cell.Content;

            for (byte i = 0; i < 9; i++)
            {
                if (i != row)
                {
                    cell = GetCell(col, i);
                    cell.RemoveOpen(UpdateContent);
                    if (cell.Reset())
                    {
                        Updates.Add(cell);
                    }
                }
            }
        }
Exemplo n.º 2
0
        internal void UpdateArea(byte col, byte row)
        {
            Cell cell          = GetCell(col, row);
            char UpdateContent = cell.Content;

            int AreaCol = (col / 3) * 3;
            int AreaRow = (row / 3) * 3;

            for (byte j = 0; j < 3; j++)
            {
                for (byte i = 0; i < 3; i++)
                {
                    if (AreaCol + i != col && AreaRow + j != row)
                    {
                        cell = GetCell((byte)(AreaCol + i), (byte)(AreaRow + j));
                        cell.RemoveOpen(UpdateContent);
                        if (cell.Reset())
                        {
                            Updates.Add(cell);
                        }
                    }
                }
            }
        }