Пример #1
0
        /// <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));
        }
Пример #2
0
 /// <summary>
 ///     Initializes the cache.
 /// </summary>
 private void InitCache()
 {
     _cellsArray      = null;
     _bottomLeftCell  = null;
     _bottomRightCell = null;
     _topLeftCell     = null;
     _topRightCell    = null;
 }
Пример #3
0
 /// <summary>
 ///     Gets the bottom right point.
 /// </summary>
 /// <returns></returns>
 public PizzaCell GetBottomRightCell()
 {
     return(_bottomRightCell ?? (_bottomRightCell = _cells.GetBottomRight()));
 }
Пример #4
0
 /// <summary>
 ///     Gets the top right point.
 /// </summary>
 /// <returns></returns>
 public PizzaCell GetTopRightCell()
 {
     return(_topRightCell ?? (_topRightCell = _cells.GetTopRight()));
 }