Exemple #1
0
        public static Ring NewLShapeRing(Position startPosition, SolidColorBrush color)
        {
            RingBuilder builder = new RingBuilder(startPosition, color);

            builder.StartTo(Direction8.South).ContinueTo(Direction8.South).ContinueTo(Direction8.South)
            .ContinueTo(Direction8.East).ContinueTo(Direction8.East).ContinueTo(Direction8.East)
            .ContinueTo(Direction8.North).ContinueTo(Direction8.North)
            .ContinueTo(Direction8.West)
            .ContinueTo(Direction8.North)
            .ContinueTo(Direction8.West).CloseTo(Direction8.West);
            return(builder.GetRing());
        }
Exemple #2
0
        public static Ring NewOShape(Position startPosition)
        {
            RingBuilder builder = new RingBuilder(startPosition, Brushes.Gray);

            builder.StartTo(Direction8.East).ContinueTo(Direction8.East)
            .ContinueTo(Direction8.East).ContinueTo(Direction8.East)
            .ContinueTo(Direction8.South).ContinueTo(Direction8.South)
            .ContinueTo(Direction8.South).ContinueTo(Direction8.West)
            .ContinueTo(Direction8.West).ContinueTo(Direction8.West)
            .ContinueTo(Direction8.West).ContinueTo(Direction8.North)
            .ContinueTo(Direction8.North).CloseTo(Direction8.North);
            return(builder.GetRing());
        }