-
-
- public void paintComponent(Graphics g) {
-
- g.drawImage(damier, 0, 0, null);
-
-
-
-
- int x;
- int y;
-
-
-
- for(int i=0; i<100; i++) {
-
- if(tabPlateu[i] == 2) {
-
-
- y = i/10;
- x = i - y*10;
- g.drawImage(pionBlanc, margeGauche+ x*50, margeHaut+y*50, null);
-
-
-
- } else
-
-
- if(tabPlateu[i] == 3) {
-
-
- y = i/10;
- x = i - y*10;
-
- g.drawImage(pionNoir, margeGauche+ x*50, margeHaut+y*50, null);
- int X = margeGauche+ x*50;
-
- } else
-
- if(tabPlateu[i] == 4) {
-
- y = i/10;
- x = i - y*10;
-
- g.drawImage(caseLibre, margeGauche+ x*50, margeHaut+y*50, null);
-
- }
-
- }
-
- }
public void paintComponent(Graphics g) {
g.drawImage(damier, 0, 0, null);
int x;
int y;
for(int i=0; i<100; i++) {
if(tabPlateu[i] == 2) {
y = i/10;
x = i - y*10;
g.drawImage(pionBlanc, margeGauche+ x*50, margeHaut+y*50, null);
} else
if(tabPlateu[i] == 3) {
y = i/10;
x = i - y*10;
g.drawImage(pionNoir, margeGauche+ x*50, margeHaut+y*50, null);
int X = margeGauche+ x*50;
} else
if(tabPlateu[i] == 4) {
y = i/10;
x = i - y*10;
g.drawImage(caseLibre, margeGauche+ x*50, margeHaut+y*50, null);
}
}
}