Advertisement
HyperSensualNarwhal

broken tetris

Dec 8th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3.  
  4. using std::cout;
  5. using std::cin;
  6. using std::endl;
  7.  
  8.  
  9. void main()
  10. {
  11.     // setlocale(LC_ALL, "Russian");
  12.  
  13.  
  14.     int n = 0;
  15.  
  16.     while (1)
  17.     {
  18.         for (int i = 0; i < 10; i++)
  19.         {
  20.  
  21.             for (int j = 0; j <= 10; j++)
  22.             {
  23.                 (i == 9) ? cout << "_" : cout << " ";
  24.                 ((i == n) && (j == 4 || j == 5)) ? cout << "*" : cout << " ";
  25.             }
  26.             cout << endl;
  27.         }
  28.  
  29.         Sleep(500);
  30.         if (n + 1 < 10) n++;
  31.  
  32.         system("cls");
  33.  
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement