"couleur board"

This commit is contained in:
gaspa 2025-05-21 21:01:43 +02:00
parent ab8da52181
commit 61d9b40263
1 changed files with 5 additions and 5 deletions

View File

@ -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);
} }