/// <summary> /// Returns true if one of the restrictions restricts the one vertex. /// </summary> public static bool Restricts(this RestrictionCollection restrictions, uint vertex) { for (var r = 0; r < restrictions.Count; r++) { var restriction = restrictions[r]; if (restriction.Restricts(vertex)) { return(true); } } return(false); }
/// <summary> /// Restricts the given turn. /// </summary> public static bool Restricts(this RestrictionCollection restrictions, Turn turn) { return(turn.IsRestrictedBy(restrictions)); }
/// <summary> /// Adds a new restriction. /// </summary> public static void Add(this RestrictionCollection restrictions, uint vertex1, uint vertex2, uint vertex3) { restrictions.Add(new Restriction(vertex1, vertex2, vertex3)); }