/// <summary> /// Returns a string that represents the current object. /// </summary> /// <returns> /// A string that represents the current object. /// </returns> public override string ToString() { PizzaCell pizzaCellA = GetTopLeftCell(); PizzaCell pizzaCellB = GetBottomRightCell(); return(string.Format("{0} {1} {2} {3}", pizzaCellA.X, pizzaCellA.X, pizzaCellB.X, pizzaCellB.Y)); }
/// <summary> /// Initializes the cache. /// </summary> private void InitCache() { _cellsArray = null; _bottomLeftCell = null; _bottomRightCell = null; _topLeftCell = null; _topRightCell = null; }
/// <summary> /// Gets the bottom right point. /// </summary> /// <returns></returns> public PizzaCell GetBottomRightCell() { return(_bottomRightCell ?? (_bottomRightCell = _cells.GetBottomRight())); }
/// <summary> /// Gets the top right point. /// </summary> /// <returns></returns> public PizzaCell GetTopRightCell() { return(_topRightCell ?? (_topRightCell = _cells.GetTopRight())); }