コード例 #1
0
ファイル: Program.cs プロジェクト: RealDoigt/Retro-Tetro-Pro
        public static void MakeOptionMenu()
        {
            RectanglePainting.DrawRectangle(RectanglePainting.SpecialBorderType.Wavish, 0, 0, 11, 35, ConsoleColor.Yellow);

            Console.CursorTop  = 1;
            Console.CursorLeft = 2;
            Console.WriteLine("EXIT OPTIONS");

            Console.CursorLeft = 2;
            Console.WriteLine("Coloured Tetrominos");

            Console.CursorLeft = 2;
            Console.WriteLine("Special Characters");

//			Console.CursorLeft = 2;
//			Console.WriteLine("Play Music");

            Console.CursorLeft = 2;
            Console.WriteLine("Game Difficulty");

            Console.CursorLeft = 2;
            Console.WriteLine("Starting Level");

            Console.CursorLeft = 2;
            Console.WriteLine("Piece Falling Delay");

            Console.CursorLeft = 2;
            Console.WriteLine("Tick Duration");

            Console.CursorLeft = 2;
            Console.Write("Speed Increase Cycle");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: RealDoigt/Retro-Tetro-Pro
        public static void PrintControls()
        {
            const byte LEFT_PADDING = 2;

            Console.Clear();
            RectanglePainting.DrawRectangle(RectanglePainting.SpecialBorderType.Wavish, 0, 0, 5, 25, ConsoleColor.DarkRed);
            Console.SetCursorPosition(LEFT_PADDING, 1);
            Console.WriteLine("Arrow keys to move");
            Console.CursorLeft = LEFT_PADDING;
            Console.WriteLine("Space bar to pause");
            Console.CursorLeft = LEFT_PADDING;
            Console.WriteLine("Z to rotate");
            Console.CursorTop += 2;
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: RealDoigt/Retro-Tetro-Pro
 public static void MakeMainMenu()
 {
     RectanglePainting.DrawRectangle(RectanglePainting.SpecialBorderType.Wavish, 35, 10, 6, 11, ConsoleColor.Gray);
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.CursorLeft      = 37;
     Console.CursorTop       = 11;
     Console.WriteLine("Play");
     Console.CursorLeft = 37;
     Console.WriteLine("Options");
     Console.CursorLeft = 37;
     Console.WriteLine("Controls");
     Console.CursorLeft = 37;
     Console.Write("Exit");
 }
コード例 #4
0
        static void DrawUI()
        {
            var border = RectanglePainting.BorderType.Double;
            var colour = ConsoleColor.DarkGreen;

            // Playing field
            RectanglePainting.DrawRectangle(border, 0, 0, FIELD_HEIGHT + 1, FIELD_WIDTH + 1, colour);

            // Next piece
            RectanglePainting.DrawSquare(border, NEXT_POS_X, NEXT_POS_Y, Tetromino.LENGTH + 2, colour);
            Console.ForegroundColor = ConsoleColor.White;
            Console.CursorLeft      = NEXT_POS_X + 1;
            Console.CursorTop       = NEXT_POS_Y - 1;
            Console.Write("NEXT");

            // Level, Lines, speed
            RectanglePainting.DrawRectangle(border, NEXT_POS_X, NEXT_POS_Y + 6, 5, Tetromino.LENGTH + 2, colour);
            Console.CursorLeft = NEXT_POS_X + 1;
            Console.CursorTop  = NEXT_POS_Y + 7;
            Console.Write("   L");             // Levels
            Console.CursorLeft = NEXT_POS_X + 1;
            Console.CursorTop  = NEXT_POS_Y + 8;
            Console.Write("   C");             // lines Cleared
            Console.CursorLeft = NEXT_POS_X + 1;
            Console.CursorTop  = NEXT_POS_Y + 9;
            Console.Write("   T");             // falling speed in Ticks

            // Score
            RectanglePainting.DrawRectangle(border, 0, FIELD_HEIGHT + 2, 3, FIELD_WIDTH + 8, ConsoleColor.Yellow);
            Console.CursorLeft = 7;
            Console.CursorTop  = FIELD_HEIGHT + 1;
            //Console.ForegroundColor = ConsoleColor.White;
            Console.Write("SCORE");
            Console.CursorTop  = FIELD_HEIGHT + 3;
            Console.CursorLeft = 2;
            Console.Write("                 ");
        }