Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. type=rand()%4;
  2.     color=rand()%3;
  3.  
  4.     switch(type)    {
  5.     case 0:        //litera L
  6.         tab[1][0][1]=color;
  7.         tab[2][0][1]=color;
  8.         tab[3][0][1]=color;
  9.         tab[3][0][2]=color;
  10.         break;
  11.     case 1:        // klocek 4 na 1 na 1
  12.         tab[1][0][1]=color;
  13.         tab[2][0][1]=color;
  14.         tab[3][0][1]=color;
  15.         tab[0][0][1]=color;
  16.         break;
  17.     case 2:       // klocek 2 na 2 na 2
  18.         tab[1][0][1]=color;
  19.         tab[2][0][1]=color;
  20.         tab[1][0][2]=color;
  21.         tab[2][0][2]=color;
  22.         tab[1][1][1]=color;
  23.         tab[2][1][1]=color;
  24.         tab[1][1][2]=color;
  25.         tab[2][1][2]=color;
  26.         break;
  27.     case 3:        // klocek schodki
  28.         tab[1][0][1]=color;
  29.         tab[2][0][1]=color;
  30.         tab[3][0][1]=color;
  31.         tab[2][0][2]=color;
  32.         break;
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement