public void Apply(HraciPole game)
        {
            int length = game.IndexContainer.rowIndexes.Length;

            // Ziskat symboly, ktere v danem radku chybi a pro kazde nezaplnene pole testovat,
            // zda se da jednoznacne usoudit, ze lze na pole umistit symbol, ktery se v danem sloupci nenachazi.

            for (int i = 0; i < length; i++)
            {
                var rowIndex = game.IndexContainer.rowIndexes[i];

                // Get symbols missing in the row
                var result = game.Symbols.Except(rowIndex).ToArray();

                for (int j = 0; j < result.Length; j++)
                {
                }
            }
        }
Example #2
0
 private static bool JednaSeOHraciPole(HraciPole hraciPole)
 {
     return ((hraciPole.Figurka.Souradnice.Item1 + hraciPole.Figurka.Souradnice.Item2) % 2) == 1;
 }
Example #3
0
        private void VytvorHraciPlochu()
        {
            if (HraciDeska.HraciPoles.Any())
              {
            foreach (var hraciPole in HraciDeska.HraciPoles)
            {
              Controls.Remove(hraciPole);
            }
              }

              HraciDeska.HraciPoles = new List<HraciPole>();
              HraciDeska.VybranePole = null;

              for (var x = 0; x < 10; x++)
              {
            for (var y = 0; y < 10; y++)
            {
              var hraciPole = new HraciPole(new Tuple<int, int>(x, y));
              HraciDeska.HraciPoles.Add(hraciPole);
            }
              }

              foreach (var hraciPole in HraciDeska.HraciPoles)
              {
            Controls.Add(hraciPole);
              }
        }