예제 #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()));
 }