Ejemplo n.º 1
0
        /// <summary>
        /// Verifies the specified SGF coordinates translate correctly.
        /// </summary>
        /// <param name="coordinate">The coordinate.</param>
        /// <returns></returns>
        public static bool VerifySGF(int boardSize, string coordinate, string outVariation)
        {
            int lPoint = CoordinateSystem.AtFromSGF(coordinate, boardSize);

            CoordinateSystem lCoord = CoordinateSystem.GetCoordinateSystem(boardSize);

            string lCoordinate = lCoord.ToString(lPoint);

            Assert.AreEqual(outVariation.ToLower(), lCoordinate.ToLower(), coordinate);

            return(outVariation.ToLower() == lCoordinate.ToLower());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Verifies the specified GO/GTP coordinates translate correctly.
        /// </summary>
        /// <param name="coordinate">The coordinate.</param>
        /// <returns></returns>
        public static bool Verify(int boardSize, string coordinate)
        {
            int lPoint = CoordinateSystem.At(coordinate, boardSize);

            CoordinateSystem lCoord = CoordinateSystem.GetCoordinateSystem(boardSize);

            string lCoordinate = lCoord.ToString(lPoint);

            Assert.AreEqual(coordinate.ToLower(), lCoordinate.ToLower());

            return(coordinate.ToLower() == lCoordinate.ToLower());
        }