Exemplo n.º 1
0
        /// <summary>
        /// Creates a new hexagon point
        /// </summary>
        public HexPoint(Hexagon hex1, Hexagon hex2, Hexagon hex3)
        {
            Hex1 = hex1;
            Hex2 = hex2;
            Hex3 = hex3;

            if (!hex1.IsTouching(hex2) || !hex2.IsTouching(hex3) || !hex1.IsTouching(hex3))
                throw new ArgumentException(string.Format("Invalid hexagon point: {0}.", this));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new hexagon edge
        /// </summary>
        public HexEdge(Hexagon hex1, Hexagon hex2)
        {
            Hex1 = hex1;
            Hex2 = hex2;

            if (!hex1.IsTouching(hex2))
                throw new ArgumentException(string.Format("Invalid hexagon edge: {0}.", this));
        }