Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  tetris
Language: C/C++
Code:
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
//qwertyui to adres 4 kwadratow z ktorych skladaja sie wszystkie figury (L, duży kwadrat, linia, piorun), p okresla figure w kodzie
int q, w, e, r, t, y, u, i, p;
//TETRIS
int main()
{
     long double tab[15][8]; //wyskosc 15, szerokosc 8 gry
     for (int a = 0; a < 15; a++) //proces wypelnienia na poczatku by wszystkie pola byly puste (rowne 0)
     {
          for (int s = 0; s < 8; s++)
          {
               tab[a][s] = 0;
          }
     }
     srand(time(NULL)); //losowanie pierwszej figury
     p = rand() % 4;
     if (p == 0) // piorun
     {
          q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
          tab[q][t] = 1;
          tab[w][y] = 1;
          tab[e][u] = 1;
          tab[r][i] = 1;
     }
     if (p == 1) // kwadrat
     {
          q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
          tab[q][t] = 1;
          tab[w][y] = 1;
          tab[e][u] = 1;
          tab[r][i] = 1;
     }
     if (p == 2) // linia
     {
          q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
          tab[q][t] = 1;
          tab[w][y] = 1;
          tab[e][u] = 1;
          tab[r][i] = 1;
     }
     if (p == 3) // L
     {
          q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
          tab[q][t] = 1;
          tab[w][y] = 1;
          tab[e][u] = 1;
          tab[r][i] = 1;
     }
     int k = 6, m = 0, n = 0, z = 0;
     // k - rodzaj komendy
     // m - kierunek figury
     // n - zabezpieczenie przed wieloma komendami na raz i podwojnym spawnem figur
     while (k > 0)
     {
          //proces wyswietlania
          for (int i = 0; i < 15; i++)
          {
               for (int j = 0; j < 8; j++)
               {
                    cout << tab[i][j] << " ";
               }
               cout << endl;
          }
          //komendy dla gracza
          cout << "komendy: 0-koniec gry 1-obrot w lewo 2-ruch w lewo 3-akcpetuj obecna pozycje 4-ruch w prawo 5-obrot w prawo";
          cin >> k;
          if ((n == 0) && (q == 14 || w == 14 || e == 14 || r == 14)) //blokada podstawy
          {
               srand(time(NULL)); //losowanie nowej figury
               p = rand() % 4;
               if (p == 0) // piorun
               {
                    q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
                    tab[q][t] = 1;
                    tab[w][y] = 1;
                    tab[e][u] = 1;
                    tab[r][i] = 1;
               }
               if (p == 1) // kwadrat
               {
                    q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
                    tab[q][t] = 1;
                    tab[w][y] = 1;
                    tab[e][u] = 1;
                    tab[r][i] = 1;
               }
               if (p == 2) // linia
               {
                    q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
                    tab[q][t] = 1;
                    tab[w][y] = 1;
                    tab[e][u] = 1;
                    tab[r][i] = 1;
               }
               if (p == 3) // L
               {
                    q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
                    tab[q][t] = 1;
                    tab[w][y] = 1;
                    tab[e][u] = 1;
                    tab[r][i] = 1;
               }
               n = 1;
               m = 0;
               for (int i = 0; i < 15; i++)
               {
                    if (tab[i][0] == 1 && tab[i][1] == 1 && tab[i][2] == 1 && tab[i][3] == 1 && tab[i][4] == 1 && tab[i][5] == 1 && tab[i][6] == 1 && tab[i][7] == 1)
                    {
                         z++;
                         tab[i][0] = 0;
                         tab[i][1] = 0;
                         tab[i][2] = 0;
                         tab[i][3] = 0;
                         tab[i][4] = 0;
                         tab[i][5] = 0;
                         tab[i][6] = 0;
                         tab[i][7] = 0;
                         for (int j = i; j > 3; j--)
                         {
                              tab[j][0] = tab[j - 1][0];
                              tab[j][1] = tab[j - 1][1];
                              tab[j][2] = tab[j - 1][2];
                              tab[j][3] = tab[j - 1][3];
                              tab[j][4] = tab[j - 1][4];
                              tab[j][5] = tab[j - 1][5];
                              tab[j][6] = tab[j - 1][6];
                              tab[j][7] = tab[j - 1][7];
                         }
                    }
               }
          }
          if ((n == 0) && (p == 0)) //ruch dla pioruna
          {
               if (((m == 0) && (tab[e + 1][u] != 0 || tab[r + 1][i] != 0 || tab[w + 1][y] != 0) && (n == 0)) || ((m == 1) && (tab[q + 1][t] != 0 || tab[e + 1][u] != 0) && (n == 0)))
               {
                    m = 0;
                    n = 1;
                    srand(time(NULL)); //losowanie nowej figury
                    p = rand() % 4;
                    if (p == 0) // piorun
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 1) // kwadrat
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 2) // linia
                    {
                         q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 3) // L
                    {
                         q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    for (int i = 0; i < 15; i++)
                    {
                         if (tab[i][0] == 1 && tab[i][1] == 1 && tab[i][2] == 1 && tab[i][3] == 1 && tab[i][4] == 1 && tab[i][5] == 1 && tab[i][6] == 1 && tab[i][7] == 1)
                         {
                              z++;
                              tab[i][0] = 0;
                              tab[i][1] = 0;
                              tab[i][2] = 0;
                              tab[i][3] = 0;
                              tab[i][4] = 0;
                              tab[i][5] = 0;
                              tab[i][6] = 0;
                              tab[i][7] = 0;
                              for (int j = i; j > 3; j--)
                              {
                                   tab[j][0] = tab[j - 1][0];
                                   tab[j][1] = tab[j - 1][1];
                                   tab[j][2] = tab[j - 1][2];
                                   tab[j][3] = tab[j - 1][3];
                                   tab[j][4] = tab[j - 1][4];
                                   tab[j][5] = tab[j - 1][5];
                                   tab[j][6] = tab[j - 1][6];
                                   tab[j][7] = tab[j - 1][7];
                              }
                         }
                    }
               }
               else
               {
                    tab[q][t] = 0;
                    tab[w][y] = 0;
                    tab[e][u] = 0;
                    tab[r][i] = 0;
                    q++;
                    w++;
                    e++;
                    r++;
               }
               if ((k == 1) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[e + 1][u + 2] == 0 || tab[r][i + 1] == 0))
                    {
                         m = 1;
                         n = 1;
                         q = q + 1;
                         e = e + 1;
                         y = y - 1;
                         u = u + 2;
                         i = i + 1;
                    }
                    if ((n == 0) && (m == 1) && (tab[w][y + 1] == 0 || tab[e + 1][u + 2] == 0))
                    {
                         m = 0;
                         n = 1;
                         q = q - 1;
                         e = e - 1;
                         y = y + 1;
                         u = u - 2;
                         i = i - 1;
                    }
               }
               if ((k == 2) && (n == 0))
               {
                    t--;
                    y--;
                    u--;
                    i--;
               }
               if ((k == 3) && (n == 0))
               {

               }
               if ((k == 4) && (n == 0))
               {
                    t++;
                    y++;
                    u++;
                    i++;
               }
               if ((k == 5) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[e + 1][u + 2] == 0 || tab[r][i + 1] == 0))
                    {
                         m = 1;
                         n = 1;
                         q = q + 1;
                         e = e + 1;
                         y = y - 1;
                         u = u + 2;
                         i = i + 1;
                    }
                    if ((n == 0) && (m == 1) && (tab[w][y + 1] == 0 || tab[e + 1][u + 2] == 0))
                    {
                         m = 0;
                         n = 1;
                         q = q - 1;
                         e = e - 1;
                         y = y + 1;
                         u = u - 2;
                         i = i - 1;
                    }
               }
               tab[q][t] = 1;
               tab[w][y] = 1;
               tab[e][u] = 1;
               tab[r][i] = 1;
          }
          if ((n == 0) && (p == 1)) //ruch dla kwadratu
          {
               if ((m == 0) && (tab[e + 1][u] != 0 || tab[r + 1][i] != 0))
               {
                    m = 0;
                    n = 1;
                    srand(time(NULL)); //losowanie nowej figury
                    p = rand() % 4;
                    if (p == 0) // piorun
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 1) // kwadrat
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 2) // linia
                    {
                         q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 3) // L
                    {
                         q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    for (int i = 0; i < 15; i++)
                    {
                         if (tab[i][0] == 1 && tab[i][1] == 1 && tab[i][2] == 1 && tab[i][3] == 1 && tab[i][4] == 1 && tab[i][5] == 1 && tab[i][6] == 1 && tab[i][7] == 1)
                         {
                              z++;
                              tab[i][0] = 0;
                              tab[i][1] = 0;
                              tab[i][2] = 0;
                              tab[i][3] = 0;
                              tab[i][4] = 0;
                              tab[i][5] = 0;
                              tab[i][6] = 0;
                              tab[i][7] = 0;
                              for (int j = i; j > 3; j--)
                              {
                                   tab[j][0] = tab[j - 1][0];
                                   tab[j][1] = tab[j - 1][1];
                                   tab[j][2] = tab[j - 1][2];
                                   tab[j][3] = tab[j - 1][3];
                                   tab[j][4] = tab[j - 1][4];
                                   tab[j][5] = tab[j - 1][5];
                                   tab[j][6] = tab[j - 1][6];
                                   tab[j][7] = tab[j - 1][7];
                              }
                         }
                    }
               }
               else
               {
                    tab[q][t] = 0;
                    tab[w][y] = 0;
                    tab[e][u] = 0;
                    tab[r][i] = 0;
                    q++;
                    w++;
                    e++;
                    r++;
               }
               if ((k == 1) && (n == 0))
               {
                    //lol, kto by chcial obrocic kwadrat?
               }
               if ((k == 2) && (n == 0))
               {
                    t--;
                    y--;
                    u--;
                    i--;
               }
               if ((k == 3) && (n == 0))
               {

               }
               if ((k == 4) && (n == 0))
               {
                    t++;
                    y++;
                    u++;
                    i++;
               }
               if ((k == 5) && (n == 0))
               {
                    //juz byl smiech
               }
               tab[q][t] = 1;
               tab[w][y] = 1;
               tab[e][u] = 1;
               tab[r][i] = 1;
          }
          if ((n == 0) && (p == 2)) //ruch dla lini
          {
               if (((m == 0) && (tab[q + 1][t] != 0 || tab[w + 1][y] != 0 || tab[e + 1][u] != 0 || tab[r + 1][i] != 0) && (n == 0)) || ((m == 1) && (tab[r + 1][i] != 0) && (n == 0)))
               {
                    m = 0;
                    n = 1;
                    srand(time(NULL)); //losowanie nowej figury
                    p = rand() % 4;
                    if (p == 0) // piorun
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 1) // kwadrat
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 2) // linia
                    {
                         q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 3) // L
                    {
                         q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    for (int i = 0; i < 15; i++)
                    {
                         if (tab[i][0] == 1 && tab[i][1] == 1 && tab[i][2] == 1 && tab[i][3] == 1 && tab[i][4] == 1 && tab[i][5] == 1 && tab[i][6] == 1 && tab[i][7] == 1)
                         {
                              z++;
                              tab[i][0] = 0;
                              tab[i][1] = 0;
                              tab[i][2] = 0;
                              tab[i][3] = 0;
                              tab[i][4] = 0;
                              tab[i][5] = 0;
                              tab[i][6] = 0;
                              tab[i][7] = 0;
                              for (int j = i; j > 3; j--)
                              {
                                   tab[j][0] = tab[j - 1][0];
                                   tab[j][1] = tab[j - 1][1];
                                   tab[j][2] = tab[j - 1][2];
                                   tab[j][3] = tab[j - 1][3];
                                   tab[j][4] = tab[j - 1][4];
                                   tab[j][5] = tab[j - 1][5];
                                   tab[j][6] = tab[j - 1][6];
                                   tab[j][7] = tab[j - 1][7];
                              }
                         }
                    }
               }
               else
               {
                    tab[q][t] = 0;
                    tab[w][y] = 0;
                    tab[e][u] = 0;
                    tab[r][i] = 0;
                    q++;
                    w++;
                    e++;
                    r++;
               }
               if ((k == 1) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[q - 1][y] == 0) && (tab[e + 1][y] == 0) && (tab[r + 2][y] == 0)) //obrot lini w pozycji poziomej
                    {
                         m = 1;
                         n++;
                         q = q - 1;
                         e = e + 1;
                         r = r + 2;
                         t = y;
                         u = y;
                         i = y;
                    }
                    if ((n == 0) && (m == 1) && (tab[q + 1][y - 1] == 0) && (tab[e - 1][y + 1] == 0) && (tab[r - 2][y + 2] == 0)) //obrot lini w pozycji pionowej
                    {
                         m = 0;
                         n++;
                         q = w;
                         e = w;
                         r = w;
                         t = y - 1;
                         u = y + 1;
                         i = y + 2;
                    }
               }
               if ((k == 2) && (n == 0))
               {
                    t--;
                    y--;
                    u--;
                    i--;
               }
               if ((k == 3) && (n == 0))
               {

               }
               if ((k == 4) && (n == 0))
               {
                    t++;
                    y++;
                    u++;
                    i++;
               }
               if ((k == 5) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[q - 1][y] == 0) && (tab[e + 1][y] == 0) && (tab[r + 2][y] == 0)) //obrot lini w pozycji poziomej
                    {
                         m = 1;
                         n++;
                         q = q - 1;
                         e = e + 1;
                         r = r + 2;
                         t = y;
                         u = y;
                         i = y;
                    }
                    if ((n == 0) && (m == 1) && (tab[q + 1][y - 1] == 0) && (tab[e - 1][y + 1] == 0) && (tab[r - 2][y + 2] == 0)) //obrot lini w pozycji pionowej
                    {
                         m = 0;
                         n++;
                         q = w;
                         e = w;
                         r = w;
                         t = y - 1;
                         u = y + 1;
                         i = y + 2;
                    }
               }
               tab[q][t] = 1;
               tab[w][y] = 1;
               tab[e][u] = 1;
               tab[r][i] = 1;
          }
          if ((n == 0) && (p == 3)) //ruch dla L
          {
               if (((m == 0) && (tab[e + 1][u] != 0 || tab[r + 1][i] != 0) && (n == 0)) || ((m == 1) && (tab[q + 1][t] != 0 || tab[w + 1][y] != 0 || tab[e + 1][u] != 0) && (n == 0)) || ((m == 2) && (tab[q + 1][t] != 0 || tab[r + 1][i] != 0) && (n == 0)) || ((m == 3) && (tab[q + 1][t] != 0 || tab[w + 1][y] != 0 || tab[r + 1][i] != 0) && (n == 0)))
               {
                    m = 0;
                    n = 1;
                    srand(time(NULL)); //losowanie nowej figury
                    p = rand() % 4;
                    if (p == 0) // piorun
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 2, i = 3;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 1) // kwadrat
                    {
                         q = 0, w = 0, e = 1, r = 1, t = 3, y = 4, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 2) // linia
                    {
                         q = 0, w = 0, e = 0, r = 0, t = 2, y = 3, u = 4, i = 5;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    if (p == 3) // L
                    {
                         q = 0, w = 1, e = 2, r = 2, t = 3, y = 3, u = 3, i = 4;
                         tab[q][t] = 1;
                         tab[w][y] = 1;
                         tab[e][u] = 1;
                         tab[r][i] = 1;
                    }
                    for (int i = 0; i < 15; i++)
                    {
                         if (tab[i][0] == 1 && tab[i][1] == 1 && tab[i][2] == 1 && tab[i][3] == 1 && tab[i][4] == 1 && tab[i][5] == 1 && tab[i][6] == 1 && tab[i][7] == 1)
                         {
                              z++;
                              tab[i][0] = 0;
                              tab[i][1] = 0;
                              tab[i][2] = 0;
                              tab[i][3] = 0;
                              tab[i][4] = 0;
                              tab[i][5] = 0;
                              tab[i][6] = 0;
                              tab[i][7] = 0;
                              for (int j = i; j > 3; j--)
                              {
                                   tab[j][0] = tab[j - 1][0];
                                   tab[j][1] = tab[j - 1][1];
                                   tab[j][2] = tab[j - 1][2];
                                   tab[j][3] = tab[j - 1][3];
                                   tab[j][4] = tab[j - 1][4];
                                   tab[j][5] = tab[j - 1][5];
                                   tab[j][6] = tab[j - 1][6];
                                   tab[j][7] = tab[j - 1][7];
                              }
                         }
                    }
               }
               else
               {
                    tab[q][t] = 0;
                    tab[w][y] = 0;
                    tab[e][u] = 0;
                    tab[r][i] = 0;
                    q++;
                    w++;
                    e++;
                    r++;
               }
               if ((k == 1) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[q + 2][t - 1] == 0 && tab[r - 1][i] == 0))
                    {
                         n = 1;
                         m = 1;
                         q = q + 2;
                         w = w + 1;
                         r = r - 1;
                         t = t - 1;
                         u = u + 1;
                    }
                    if ((n == 0) && (m == 1) && (tab[e - 2][u] == 0 && tab[r - 1][i - 1] == 0))
                    {
                         n = 1;
                         m = 2;
                         w = w - 1;
                         e = e - 2;
                         r = r - 1;
                         t = t + 2;
                         y = y + 1;
                         i = i - 1;
                    }
                    if ((n == 0) && (m == 2) && (tab[w][y - 1] == 0 && tab[e + 1][u - 2] == 0 && tab[r + 2][i - 1] == 0))
                    {
                         n = 1;
                         m = 3;
                         q = q - 1;
                         e = e + 1;
                         r = r + 2;
                         y = y - 1;
                         u = u - 2;
                         i = i - 1;
                    }
                    if ((n == 0) && (m == 3) && (tab[q - 1][t - 1] == 0 && tab[e + 1][u + 1] == 0 && tab[r][i + 2] == 0))
                    {
                         n = 1;
                         m = 0;
                         q = q - 1;
                         e = e + 1;
                         t = t - 1;
                         u = u + 1;
                         i = i + 2;
                    }
               }
               if ((k == 2) && (n == 0))
               {
                    t--;
                    y--;
                    u--;
                    i--;
               }
               if ((k == 3) && (n == 0))
               {

               }
               if ((k == 4) && (n == 0))
               {
                    t++;
                    y++;
                    u++;
                    i++;
               }
               if ((k == 5) && (n == 0))
               {
                    if ((n == 0) && (m == 0) && (tab[q + 1][t + 1] == 0 && tab[e - 1][u - 1] == 0 && tab[r][i - 2] == 0))
                    {
                         n = 1;
                         m = 3;
                         q = q + 1;
                         e = e - 1;
                         t = t + 1;
                         u = u - 1;
                         i = i - 2;
                    }
                    if ((n == 0) && (m == 3) && (tab[q + 1][t] == 0 && tab[e - 1][u + 2] == 0 && tab[r - 2][i + 1] == 0))
                    {
                         n = 1;
                         m = 2;
                         q = q + 1;
                         e = e - 1;
                         r = r - 2;
                         y = y + 1;
                         u = u + 2;
                         i = i + 1;
                    }
                    if ((n == 0) && (m == 2) && (tab[q][t - 2] == 0 && tab[w + 1][y + 1] == 0))
                    {
                         n = 1;
                         m = 1;
                         w = w + 1;
                         e = e + 2;
                         r = r + 1;
                         t = t - 2;
                         y = y - 1;
                         i = i + 1;
                    }
                    if ((n == 0) && (m == 1) && (tab[q - 2][t + 1] == 0 && tab[w - 1][y] == 0))
                    {
                         n = 1;
                         m = 0;
                         q = q - 2;
                         w = w - 1;
                         r = r + 1;
                         t = t + 1;
                         u = u - 1;
                    }
               }
               tab[q][t] = 1;
               tab[w][y] = 1;
               tab[e][u] = 1;
               tab[r][i] = 1;
          }
          n = 0;
          if (k == 0) //wynik
          {
               cout << "Liczba wyczyszczonych rzadkow: " << z << endl << "Dobra Gra!";
          }
     }
}
Comments: