"couleur board"
This commit is contained in:
parent
ab8da52181
commit
61d9b40263
|
|
@ -111,13 +111,13 @@ public class JPanelChessBoard extends JPanel {
|
||||||
for (int x = 0; x < myGame.getWidth(); x++) {
|
for (int x = 0; x < myGame.getWidth(); x++) {
|
||||||
for (int y = 0; y < myGame.getHeight(); y++) {
|
for (int y = 0; y < myGame.getHeight(); y++) {
|
||||||
|
|
||||||
Piece p = getPieceAt(x, y); //définir p AVANT toute condition
|
Piece p = getPieceAt(x, y); //d<EFBFBD>finir p AVANT toute condition
|
||||||
|
|
||||||
// Damier inversé
|
// Damier invers<EFBFBD>
|
||||||
if ((x + y) % 2 == 0) {
|
if ((x + y) % 2 == 0) {
|
||||||
g.setColor(new Color(1, 1, 1)); // clair
|
g.setColor(new Color(255, 250, 255)); // clair
|
||||||
} else {
|
} else {
|
||||||
g.setColor(new Color(240, 240, 240)); // foncé
|
g.setColor(new Color(50, 25, 1)); // fonc<EFBFBD>
|
||||||
}
|
}
|
||||||
|
|
||||||
// Surlignage rouge en cas de mat
|
// Surlignage rouge en cas de mat
|
||||||
|
|
@ -125,7 +125,7 @@ public class JPanelChessBoard extends JPanel {
|
||||||
g.setColor(Color.RED);
|
g.setColor(Color.RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sélection
|
// S<EFBFBD>lection
|
||||||
if (myGame.isSelected(x, y)) {
|
if (myGame.isSelected(x, y)) {
|
||||||
g.setColor(Color.ORANGE);
|
g.setColor(Color.ORANGE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue