예제 #1
0
        /// <summary>
        /// Create a left hook figure.
        /// </summary>
        /// <returns>The left hook figure.</returns>
        public static Figure HookLeft()
        {
            //Create the figure.
            Figure figure = new Figure();

            //Set some attributes.
            figure.Color = Color.Yellow;

            //Add and create the blocks.
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, HEIGHT) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, HEIGHT * 2) });
            figure.AddBlock(new Block() { Position = new Vector2(0, HEIGHT * 2) });

            figure.CenterBlock = figure.Blocks[2];

            //Return the figure.
            return figure;
        }
예제 #2
0
        /// <summary>
        /// Create an arrow figure.
        /// </summary>
        /// <returns>The arrow figure.</returns>
        public static Figure Arrow()
        {
            //Create the figure.
            Figure figure = new Figure();

            //Set some attributes.
            figure.Color = Color.Purple;

            //Add and create the blocks.
            figure.AddBlock(new Block() { Position = new Vector2(0, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH * 2, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, HEIGHT) });

            figure.CenterBlock = figure.Blocks[1];

            //Return the figure.
            return figure;
        }
예제 #3
0
        /// <summary>
        /// Create a straight figure.
        /// </summary>
        /// <returns>The straight figure.</returns>
        public static Figure Straight()
        {
            //Create the figure.
            Figure figure = new Figure();

            //Set some attributes.
            figure.Color = Color.Red;

            //Add and create the blocks.
            figure.AddBlock(new Block() { Position = Vector2.Zero });
            figure.AddBlock(new Block() { Position = new Vector2(0, HEIGHT) });
            figure.AddBlock(new Block() { Position = new Vector2(0, HEIGHT * 2) });
            figure.AddBlock(new Block() { Position = new Vector2(0, HEIGHT * 3) });

            figure.CenterBlock = figure.Blocks[1];

            //Return the figure.
            return figure;
        }
예제 #4
0
        /// <summary>
        /// Create a left twix figure.
        /// </summary>
        /// <returns>The left twix figure.</returns>
        public static Figure TwixLeft()
        {
            //Create the figure.
            Figure figure = new Figure();

            //Set some attributes.
            figure.Color = Color.Green;

            //Add and create the blocks.
            figure.AddBlock(new Block() { Position = Vector2.Zero });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, HEIGHT) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH * 2, HEIGHT) });

            figure.CenterBlock = figure.Blocks[1];

            //Return the figure.
            return figure;
        }
예제 #5
0
        /// <summary>
        /// Create a square figure.
        /// </summary>
        /// <returns>The square figure.</returns>
        public static Figure Square()
        {
            //Create the figure.
            Figure figure = new Figure();

            //Set some attributes.
            figure.Color = Color.Blue;

            //Add and create the blocks.
            figure.AddBlock(new Block() { Position = Vector2.Zero });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, 0) });
            figure.AddBlock(new Block() { Position = new Vector2(0, HEIGHT) });
            figure.AddBlock(new Block() { Position = new Vector2(WIDTH, HEIGHT) });

            //Return the figure.
            return figure;
        }