Пример #1
0
        /// <summary>
        /// Get cell from QR coordinates
        /// </summary>
        /// <param name="position"></param>
        /// <returns>Cell found</returns>
        /// <exception cref="ArgumentOutOfRangeException">if there's no cell in the given position</exception>
        public Cell GetCellAt(QRCoordinate position)
        {
            var positionRequested = CubeCoordinate.FromQr(position);

            var cell = GetCellAt(positionRequested);

            return(cell);
        }
Пример #2
0
 /// <summary>
 /// Create QR coordinate from itself
 /// </summary>
 /// <returns>QR coordinate</returns>
 public QRCoordinate ToQr()
 {
     return(QRCoordinate.FromCube(this));
 }
Пример #3
0
 /// <summary>
 /// Create a cube coordinate from a QR coodinate
 /// </summary>
 /// <param name="input">QR coordinate (as object)</param>
 /// <returns>Cube coordinate</returns>
 public static CubeCoordinate FromQr(QRCoordinate input)
 {
     return(FromQr(input.q, input.r));
 }