Exemplo n.º 1
0
        public void InitializeCellValuesOnFieldWithMinBoundOptionsShouldNotThrow()
        {
            var min   = FieldSize.MIN_XY;
            var size  = new FieldSize(min, min, FieldSize.GetMinMines());
            var field = new Field(size);

            field.InitializeCellValues(new PointI(0, 0));
        }
        private void UpdateMaxMines()
        {
            sldMines.Minimum = FieldSize.GetMinMines();
            var maxMines = FieldSize.GetMaxMines((int)sldWidth.Value, (int)sldHeight.Value);

            if (sldMines.Value > maxMines)
            {
                sldMines.Value = maxMines;
            }
            sldMines.Maximum = maxMines;
        }
Exemplo n.º 3
0
 public void CreateFieldSizeWithValidOptionsMinBoundShouldNotThrow()
 {
     var min   = FieldSize.MIN_XY;
     var field = new FieldSize(min, min, FieldSize.GetMinMines());
 }