コード例 #1
0
ファイル: Game.cs プロジェクト: destbg/Tetris
 private void Menu()
 {
     ResetColor();
     WindowHeight = 30;
     WindowWidth  = 120;
     Clear();
     WriteLine("    Paused\n" +
               "Press '1' to resume\n" +
               "Press '2' for 'how to play'\n" +
               "Press '3' to quit");
     System.ConsoleKey input;
     while ((input = ReadKey(true).Key) != D1)
     {
         if (input == D2)
         {
             Clear();
             WriteLine("1: Move the blocks left and right by pressing 'a' and 'd'\n\n" +
                       "2: Rotate the block by pressing 'w'\n\n" +
                       "3: Move the blocks faster by pressing 's'\n\n" +
                       "4: Move the blocks instantly by pressing 'space'");
             ReadKey();
             Clear();
             WriteLine("    Paused\n" +
                       "Press '1' to resume\n" +
                       "Press '2' for 'how to play'\n" +
                       "Press '3' to quit");
         }
         else if (input == D3)
         {
             gameState = false;
             break;
         }
     }
     Clear();
     WindowWidth  = 34;
     WindowHeight = 22;
     board.Borders();
     Write(board);
 }