Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private: void randomizeButtons()
- {
- int x[] = {142, 49, 142, 49};
- int y[] = {128, 128, 83, 83};
- int cont = 1, a, b, c, d, e;
- while (cont < 5)
- {
- c = randomButton() - 1;
- a = x[c];
- b = y[c];
- d = x[cont-1];
- e = y[cont-1];
- switch (cont-1)
- {
- case 0: C4->Location = System::Drawing::Point(a, b);
- switch (c)
- {
- case 0: C4->Location = System::Drawing::Point(d, e);
- break;
- case 1: C3->Location = System::Drawing::Point(d, e);
- break;
- case 2: C2->Location = System::Drawing::Point(d, e);
- break;
- case 3: C1->Location = System::Drawing::Point(d, e);
- break;
- }
- break;
- case 1: C3->Location = System::Drawing::Point(a, b);
- switch (c)
- {
- case 0: C4->Location = System::Drawing::Point(d, e);
- break;
- case 1: C3->Location = System::Drawing::Point(d, e);
- break;
- case 2: C2->Location = System::Drawing::Point(d, e);
- break;
- case 3: C1->Location = System::Drawing::Point(d, e);
- break;
- }
- break;
- case 2: C2->Location = System::Drawing::Point(a, b);
- switch (c)
- {
- case 0: C4->Location = System::Drawing::Point(d, e);
- break;
- case 1: C3->Location = System::Drawing::Point(d, e);
- break;
- case 2: C2->Location = System::Drawing::Point(d, e);
- break;
- case 3: C1->Location = System::Drawing::Point(d, e);
- break;
- }
- break;
- case 3: C1->Location = System::Drawing::Point(a, b);
- switch (c)
- {
- case 0: C4->Location = System::Drawing::Point(d, e);
- break;
- case 1: C3->Location = System::Drawing::Point(d, e);
- break;
- case 2: C2->Location = System::Drawing::Point(d, e);
- break;
- case 3: C1->Location = System::Drawing::Point(d, e);
- break;
- }
- break;
- }
- cont++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement