Ejemplo n.º 1
0
        void createHard(string gridStr)
        {
            var grid0 = Commons.GridFromString(gridStr);
            var grid1 = Commons.CreateGrid(grid0, l => l != Solving.Impossible, Level.Hard);
            var str   = grid1.ToString();

            AllGrids[Level.Hard].Add(str);
        }
Ejemplo n.º 2
0
        void createEasy(string gridStr)
        {
            var grid0 = Commons.GridFromString(gridStr);
            var grid1 = Commons.CreateGrid(grid0, l => l == Solving.VeryEasy, Level.Easy);
            var str   = grid1.ToString();

            AllGrids[Level.Easy].Add(str);
        }
Ejemplo n.º 3
0
        void createMedium(string gridStr)
        {
            var grid0 = Commons.GridFromString(gridStr);
            var grid1 = Commons.CreateGrid(grid0, l => l == Solving.VeryEasy, Level.Medium);
            var grid2 = Commons.CreateGrid(grid1, l => l != Solving.Impossible, Level.Medium, 10);
            var str   = grid2.ToString();

            AllGrids[Level.Medium].Add(str);
        }
Ejemplo n.º 4
0
        void createEvil(string gridStr)
        {
            while (true)
            {
                var grid0 = Commons.GridFromString(gridStr);
                var grid1 = Commons.CreateGrid(grid0, l => l != Solving.Impossible, Level.Evil);
                int c0    = grid1.allCells.Count(c => c.Content == 0);
                var grid2 = Commons.CreateGrid(grid1, l => l == Solving.Impossible, Level.Evil, 1);
                int c1    = grid2.allCells.Count(c => c.Content == 0);

                if (c0 != c1)
                {
                    var str = grid2.ToString();
                    AllGrids[Level.Evil].Add(str);
                    break;
                }
            }
        }
Ejemplo n.º 5
0
        void createAll(string gridStr)
        {
            var grid0 = Commons.GridFromString(gridStr);
            var grid1 = Commons.CreateGrid(grid0, l => l == Solving.VeryEasy, Level.Easy);

            AllGrids[Level.Easy].Add(grid1.ToString());

            var grid2 = Commons.CreateGrid(grid1, l => l != Solving.Impossible, Level.Medium, 10);

            AllGrids[Level.Medium].Add(grid2.ToString());

            var grid3 = Commons.CreateGrid(grid2, l => l != Solving.Impossible, Level.Hard);

            AllGrids[Level.Hard].Add(grid3.ToString());

            var grid4 = Commons.CreateGrid(grid3, l => l == Solving.Impossible, Level.Evil, 1);

            AllGrids[Level.Evil].Add(grid4.ToString());
        }