public static SingleColorState Create(string location, string color1)
        {
            var info = GetLocationInformation(location.Trim());

            return(new SingleColorState(
                       info.Location,
                       PuzzleColorParser.Parse(color1),
                       info.IsNot,
                       info.IsRotated));
        }
        public static EdgeState Create(string location, string color1, string color2)
        {
            var info = GetLocationInformation(location.Trim());

            return(new EdgeState(
                       info.Location,
                       info.Location.AdjacentEdge,
                       PuzzleColorParser.Parse(color1),
                       PuzzleColorParser.Parse(color2),
                       info.IsNot,
                       info.IsRotated));
        }
Exemple #3
0
        public static CornerState Create(string location, string color1, string color2, string color3)
        {
            var info           = GetLocationInformation(location.Trim());
            var adjacentCorner = info.Location.AdjacentCorner;

            return(new CornerState(
                       info.Location,
                       adjacentCorner,
                       adjacentCorner.AdjacentCorner,
                       PuzzleColorParser.Parse(color1),
                       PuzzleColorParser.Parse(color2),
                       PuzzleColorParser.Parse(color3),
                       info.IsNot,
                       info.IsRotated));
        }