- for (int i=0; i<tabdejeu.length;i++){
- int x=0,y=0;
- if (i<=5){
- x=0;
- y=i+5;
- }
- else if (i<16){
- x=i-5;
- y=10;
- }
- else if (i<26){
- x=10;
- y=25-i;
- }
- else if (i<36){
- x=35-i;
- y=0;
- }
- else if (i<40){
- x=0;
- y=i-35;
- }
- else if (i==40){
- x=1;
- y=5;
- }
- else if (i==44){
- x=2;
- y=5;
- }
- else if (i==48){
- x=3;
- y=5;
- }
- else if (i==52){
- x=4;
- y=5;
- }
- else if (i==56){
- x=5;
- y=5;
- }
- else if (i==41){
- x=5;
- y=9;
- }else if (i==45){
- x=5;
- y=8;
- }
- else if (i==49){
- x=5;
- y=7;
- }
- else if (i==53){
- x=5;
- y=6;
- }
- else if (i==42){
- x=9;
- y=5;
- }else if (i==46){
- x=8;
- y=5;
- }
- else if (i==50){
- x=7;
- y=5;
- }
- else if (i==54){
- x=6;
- y=5;
- } else if (i==43){
- x=5;
- y=1;
- }else if (i==47){
- x=5;
- y=2;
- }
- else if (i==51){
- x=5;
- y=3;
- }
- else if (i==55){
- x=5;
- y=4;
- }
- switch (tabdejeu[i]){
- case 1 :
- tabLab[x][y].setIcon(iconDepart);
- break;
- case 2 :
- tabLab[x][y].setIcon(IconAdule);
- break;
- case 3 :
- tabLab[x][y].setIcon(IconArmure);
- break;
- case 4 :
- tabLab[x][y].setIcon(IconOR);
- break;
- case 5 :
- tabLab[x][y].setIcon(IconBourse);
- break;
- case 6 :
- tabLab[x][y].setIcon(IconRouille);
- break;
- case 7 :
- tabLab[x][y].setIcon(IconMystere);
- break;
- case 8 :
- tabLab[x][y].setIcon(IconQuête);
- break;
- case 9 :
- tabLab[x][y].setIcon(iconVictoire);
- break;
- case 10 :
- tabLab[x][y].setIcon(IconSeul);
- break;
- }
- }
- int x=0,y=0;
- if (pos1<=5){
- x=0;
- y=pos1+5;
- }
- else if (pos1<16){
- x=pos1-5;
- y=10;
- }
- else if (pos1<26){
- x=10;
- y=25-pos1;
- }
- else if (pos1<36){
- x=35-pos1;
- y=0;
- }
- else if (pos1<40){
- x=0;
- y=pos1-35;
- }
- else if (pos1==40){
- x=1;
- y=5;
- }
- else if (pos1==41){
- x=5;
- y=9;
- }
- else if (pos1==42){
- x=9;
- y=5;
- }
- else if (pos1==43){
- x=5;
- y=1;
- }
- else if (pos1==44){
- x=2;
- y=5;
- }
- else if (pos1==45){
- x=5;
- y=8;
- }
- else if (pos1==46){
- x=8;
- y=5;
- }
- else if (pos1==47){
- x=5;
- y=2;
- }
- else if (pos1==48){
- x=3;
- y=5;
- }
- else if (pos1==49){
- x=7;
- y=5;
- }
- else if (pos1==50){
- x=7;
- y=5;
- }
- else if (pos1==51){
- x=5;
- y=3;
- }
- else if (pos1==52){
- x=4;
- y=5;
- }
- else if (pos1==53){
- x=6;
- y=5;
- }
- else if (pos1==54){
- x=6;
- y=5;
- }
- else if (pos1==55){
- x=5;
- y=4;
- }
- else if (pos1==56){
- x=5;
- y=5;
- }
- tabLab[x][y].setIcon(iconChevalier1);
- if (pos2<=5){
- x=0;
- y=pos2+5;
- }
- else if (pos2<16){
- x=pos2-5;
- y=10;
- }
- else if (pos2<26){
- x=10;
- y=25-pos2;
- }
- else if (pos2<36){
- x=35-pos2;
- y=0;
- }
- else if (pos2<40){
- x=0;
- y=pos2-35;
- }
- else if (pos2==40){
- x=1;
- y=5;
- }
- else if (pos2==41){
- x=5;
- y=9;
- }
- else if (pos2==42){
- x=9;
- y=5;
- }
- else if (pos2==43){
- x=5;
- y=1;
- }
- else if (pos2==44){
- x=2;
- y=5;
- }
- else if (pos2==45){
- x=5;
- y=8;
- }
- else if (pos2==46){
- x=8;
- y=5;
- }
- else if (pos2==47){
- x=5;
- y=2;
- }
- else if (pos2==48){
- x=3;
- y=5;
- }
- else if (pos2==49){
- x=7;
- y=5;
- }
- else if (pos2==50){
- x=7;
- y=5;
- }
- else if (pos2==51){
- x=5;
- y=3;
- }
- else if (pos2==52){
- x=4;
- y=5;
- }
- else if (pos2==53){
- x=6;
- y=5;
- }
- else if (pos2==54){
- x=6;
- y=5;
- }
- else if (pos2==55){
- x=5;
- y=4;
- }
- else if (pos2==56){
- x=5;
- y=5;
- }
- tabLab[x][y].setIcon(iconChevalier2);
- }
[text] Vincent
Viewer
Editor
You can edit this paste and save as new:
File Description
- Vincent
- Paste Code
- 25 Feb-2021
- 7.31 Kb
You can Share it:
Latest Code Pastes