Пример #1
0
        /// <summary>
        /// Get piece.
        /// </summary>
        /// <param name="point">Field point.</param>
        /// <returns>Is black point.</returns>
        public ChessPiece this[ChessPoint point]
        {
            get
            {
                return(this[point.X, point.Y]);
            }

            set
            {
                this[point.X, point.Y] = value;
            }
        }
Пример #2
0
 /// <summary>
 /// Adds vector to point
 /// </summary>
 /// <param name="point">Point coordinates.</param>
 /// <param name="vector">Sum vector value.</param>
 /// <returns></returns>
 public static ChessPoint Add(ChessPoint point, ChessVector vector)
 {
     return(new ChessPoint(point.X + vector.X, point.Y + vector.Y));
 }