Пример #1
0
        public Dimension(GameArea _area, int _index, int _dimension)
        {
            area      = _area;
            index     = _index;
            dimension = _dimension;
            if (area == null || area.Fields == null || area.Fields.Rank != 2)
            {
                throw new ApplicationException("Incorrect game area - row can not be created");
            }
            if (area.Fields.Rank <= dimension)
            {
                throw new ApplicationException("Expected too high dimension for given game area");
            }
            var length = area.Fields.GetLength(dimension);

            if (length <= index)
            {
                throw new ApplicationException("Expected too high index for given dimention of game area");
            }
        }
Пример #2
0
 public Column(GameArea _area, int _row) : base(_area, _row, 1)
 {
 }
Пример #3
0
 public Row(GameArea _area, int _row) : base(_area, _row, 0)
 {
 }