Пример #1
0
    /// <summary>
    /// Get the vertex from a given placement slot
    /// </summary>
    public static Edges GetEdgeFromPerimeterSlot(PerimeterSlots placementLocation)
    {
        switch (placementLocation)
        {
        case PerimeterSlots.N_Edge:
            return(Edges.N);

        case PerimeterSlots.NE_Edge:
            return(Edges.NE);

        case PerimeterSlots.NW_Edge:
            return(Edges.NW);

        case PerimeterSlots.SE_Edge:
            return(Edges.SE);

        case PerimeterSlots.SW_Edge:
            return(Edges.SW);

        case PerimeterSlots.S_Edge:
            return(Edges.S);

        default:
            throw new System.ArgumentOutOfRangeException($"The hexagon placement location {placementLocation} does not have an associated Edge/Side");
        }
    }
Пример #2
0
    /// <summary>
    /// Get the vertex from a given placement slot
    /// </summary>
    public static Vertexes GetVertexFromPerimeterSlot(PerimeterSlots placementLocation)
    {
        switch (placementLocation)
        {
        case PerimeterSlots.E_Vertex:
            return(Vertexes.E);

        case PerimeterSlots.NE_Vertex:
            return(Vertexes.NE);

        case PerimeterSlots.NW_Vertex:
            return(Vertexes.NW);

        case PerimeterSlots.SE_Vertex:
            return(Vertexes.SE);

        case PerimeterSlots.SW_Vertex:
            return(Vertexes.SW);

        case PerimeterSlots.W_Vertex:
            return(Vertexes.W);

        default:
            throw new System.ArgumentOutOfRangeException($"The hexagon placement location {placementLocation} does not have an associated vertex");
        }
    }