Facebook
From Little Porcupine, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 143
  1. #include<iostream>
  2. #include<windows.h>
  3. using namespace std;
  4. int a=7;
  5. int b=6;
  6.     void gotoxy(int x, int y)
  7.     {
  8.         COORD c;
  9.         c.X = x - 1;
  10.         c.Y = y - 1;
  11.         SetConsoleCursorPosition
  12.         (GetStdHandle(STD_OUTPUT_HANDLE), c);
  13.     }
  14.     void boisko()
  15.     {
  16.         for(int i=0;i<16;i++)
  17.         {
  18.             gotoxy(6,1);
  19.                 cout<<"__________"<<endl;
  20.                 gotoxy(6,2);
  21.                 cout<<"||"<<endl;
  22.                 gotoxy(6,3);
  23.                 cout<<"||"<<endl;
  24.                 gotoxy(14,2);
  25.                 cout<<"||"<<endl;
  26.                 gotoxy(14,3);
  27.                 cout<<"||"<<endl;
  28.                 gotoxy(i+2,3);
  29.                 cout<<"____"<<endl;
  30.                 gotoxy(6,6);
  31.                 cout<<"#"<<endl;
  32.                 gotoxy(17,10);
  33.                 cout<<"#"<<endl;
  34.                 gotoxy(3,16);
  35.                 cout<<"#"<<endl;
  36.                 gotoxy(1,i+4);
  37.                 cout<<"||"<<endl;
  38.                 gotoxy(20,i+4);
  39.                 cout<<"||"<<endl;
  40.                 gotoxy(14,20);
  41.                 cout<<"||"<<endl;
  42.                 gotoxy(14,21);
  43.                 cout<<"||"<<endl;
  44.                 gotoxy(6,20);
  45.                 cout<<"||"<<endl;
  46.                 gotoxy(6,21);
  47.                 cout<<"||"<<endl;
  48.                 gotoxy(8,21);
  49.                 cout<<"______"<<endl;
  50.                  gotoxy(i+2,19);
  51.                 cout<<"___"<<endl;
  52.                 gotoxy(a,b);
  53.                 cout<<"@"<<endl;
  54.         }
  55.     }
  56. int main()
  57. {
  58.  
  59.  
  60.     while(true){
  61.         system("cls");
  62.         boisko();
  63.             for(a=7;a<14;)
  64.         {
  65.             while(a<16&&b<10)
  66.             {
  67.  
  68.             gotoxy(a,b);
  69.             cout<<"@"<<endl;
  70.             a++;
  71.             a++;
  72.             b++;
  73.             Sleep(100);
  74.             system("cls");
  75.  
  76.             boisko();
  77.             }
  78.         }
  79.  
  80.     for(a=16;a>4;)
  81.  
  82.         while(a>4&&b<16)
  83.         {
  84.  
  85.             gotoxy(a,b);
  86.             cout<<"@"<<endl;
  87.             a--;
  88.             a--;
  89.             b++;
  90.             Sleep(100);
  91.             system("cls");
  92.             boisko();
  93.         }
  94.  
  95.     for(a=4;a<16;)
  96.  
  97.         while(a<12&&b<21)
  98.         {
  99.  
  100.             gotoxy(a,b);
  101.             cout<<"@"<<endl;
  102.             a++;
  103.             a++;
  104.             b++;
  105.             Sleep(100);
  106.             system("cls");
  107.             boisko();
  108.         }
  109.     }
  110. return 0;
  111. }