예제 #1
0
        /// <summary>
        /// Prints the next figure on the console
        /// </summary>
        /// <param name="nextFigure">The next figure object</param>
        public void PrintNextFigure(Figure nextFigure)
        {
            int left = this.Width + 5;
            int top  = 3;

            for (int i = 0; i < 6; i++)
            {
                Console.SetCursorPosition(left, top);
                for (int j = 0; j < 6; j++)
                {
                    Console.Write(new String(' ', 6));
                }

                top++;
            }

            top           = 3;
            char[,] image = nextFigure.GetImage();
            for (int i = 0; i < image.GetLength(0); i++)
            {
                Console.SetCursorPosition(left, top);
                for (int j = 0; j < image.GetLength(1); j++)
                {
                    Console.Write(image[i, j]);
                }

                top++;
            }
        }
        /// <summary>
        /// Prints the next figure on the console
        /// </summary>
        /// <param name="nextFigure">The next figure object</param>
        public void PrintNextFigure(Figure nextFigure)
        {
            int left = this.Width + 5;
            int top = 3;

            for (int i = 0; i < 6; i++)
            {
                Console.SetCursorPosition(left, top);
                for (int j = 0; j < 6; j++)
                {
                    Console.Write(new String(' ', 6));
                }

                top++;
            }

            top = 3;
            char[,] image = nextFigure.GetImage();
            for (int i = 0; i < image.GetLength(0); i++)
            {
                Console.SetCursorPosition(left, top);
                for (int j = 0; j < image.GetLength(1); j++)
                {
                    Console.Write(image[i, j]);
                }

                top++;
            }
        }