Beispiel #1
0
        private void InitBoard()
        {
            InputFixedValues  = false;
            ShowPossibleMoves = false;
            GridAnchor        = new Point(Origin.X + 1, Origin.Y + 1);
            Grid = new List <SubGrid>();
            Point location = new Point();

            for (int n = 1; n < 10; n++)
            {
                int xOffset = (n - 1) % 3;
                location.X = GridAnchor.X + xOffset * (SubGridSize + 2);
                if (n < 4)
                {
                    location.Y = GridAnchor.Y;
                }
                else
                {
                    if (n < 7)
                    {
                        location.Y = GridAnchor.Y + SubGridSize + 2;
                    }
                    else
                    {
                        location.Y = GridAnchor.Y + 2 * SubGridSize + 4;
                    }
                }
                SubGrid grid = new SubGrid(location, g, AtomSize);

                Grid.Add(grid);
            }
        }
Beispiel #2
0
        public void SetRank(GridLocation location, int rank)
        {
            if (rank < 0 || rank > 9)
            {
                rank = 0;
            }
            SubGrid grid = GetSubgrid(location);

            grid.InputFixedValues = InputFixedValues;
            grid.SetRank(location, rank);
        }
Beispiel #3
0
        public void UnSelect(GridLocation location)
        {
            SubGrid grid = GetSubgrid(location);

            grid.UnSelect(location);
        }
Beispiel #4
0
        public void SetAvailableRanks(GridLocation location, List <int> ranks)
        {
            SubGrid grid = GetSubgrid(location);

            grid.SetAvailableRanks(location, ranks);
        }
Beispiel #5
0
        public void MakeFixed(GridLocation location)
        {
            SubGrid grid = GetSubgrid(location);

            grid.MakeFixed(location);
        }