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"); } }
public Column(GameArea _area, int _row) : base(_area, _row, 1) { }
public Row(GameArea _area, int _row) : base(_area, _row, 0) { }