Esempio n. 1
0
    // Check if the target lies on the given point.
    public bool PointHasTarget(PointData point)
    {
        if (m_CurrentFace != m_Target.m_GridFace)
        {
            return(false);
        }

        return(PointData.Equals(m_Target.m_Position, point));
    }
Esempio n. 2
0
    public bool OccupiesPosition(int face, PointData point)
    {
        for (int i = 0; i < m_Body.Count; i++)
        {
            if (m_Body[i].m_GridFace != face)
            {
                continue;
            }

            if (PointData.Equals(m_Body[i].m_Position, point))
            {
                return(true);
            }
        }

        return(false);
    }