Example #1
0
        public static Hex GetOppositeHex(Position position)
        {
            Hex vector = neighborDirections[(int)position];

            return(new Hex(-vector.x, -vector.y, -vector.z));
        }
Example #2
0
        public static Hex CounterClockwiseDelta(Position position)
        {
            Hex vector = neighborDirections[(int)position];

            return(new Hex(-vector.y, -vector.z, -vector.x));
        }
Example #3
0
        public static Hex GetNeighborHex(Hex hex, Position position)
        {
            Hex dir = GetDirectionHex(position);

            return(new Hex(hex.column + dir.column, hex.row + dir.row));
        }