Beispiel #1
0
        static public CompoundConstraint FindFtlPairAndSolveIt(FtlSlot slot, Cube cube)
        {
            CornerEdgePair src = slot.Home.Locate(cube);

            return(new CompoundConstraint(
                       new CornerConstraint(src.Corner, slot.Home.Corner),
                       new EdgeConstraint(src.Edge, slot.Home.Edge)
                       ));
        }
Beispiel #2
0
        static FtlSlot[] HoldingSlots(CornerEdgePair src)
        {
            var holdingSlots = new List <FtlSlot>();

            foreach (var slot in Constraints.AllFtlSlots)
            {
                if (slot.Home.Edge.InSameSpace(src.Edge) ||
                    slot.Home.Corner.InSameSpace(src.Corner)
                    )
                {
                    holdingSlots.Add(slot);
                }
            }
            return(holdingSlots.ToArray());
        }