Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type=rand()%4;
- color=rand()%3;
- switch(type) {
- case 0: //litera L
- tab[1][0][1]=color;
- tab[2][0][1]=color;
- tab[3][0][1]=color;
- tab[3][0][2]=color;
- break;
- case 1: // klocek 4 na 1 na 1
- tab[1][0][1]=color;
- tab[2][0][1]=color;
- tab[3][0][1]=color;
- tab[0][0][1]=color;
- break;
- case 2: // klocek 2 na 2 na 2
- tab[1][0][1]=color;
- tab[2][0][1]=color;
- tab[1][0][2]=color;
- tab[2][0][2]=color;
- tab[1][1][1]=color;
- tab[2][1][1]=color;
- tab[1][1][2]=color;
- tab[2][1][2]=color;
- break;
- case 3: // klocek schodki
- tab[1][0][1]=color;
- tab[2][0][1]=color;
- tab[3][0][1]=color;
- tab[2][0][2]=color;
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement