Actualiser OOP_2B1_Project/src/windowInterface/JPanelChessBoard.java

This commit is contained in:
Romain MURPHY 2025-05-06 09:32:09 +02:00
parent ac44075db4
commit 1c8f5ff889
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class JPanelChessBoard extends JPanel {
if(isHighlight) {
g.setColor(Color.yellow);
}
if((x+y)%2==1 || isSelect || isHighlight) {
if((x+y)%2==1 || isSelect || isHighlight || isCheck) {
g.fillRect(
Math.round(x*cellWidth),
Math.round(y*cellHeight),
@ -120,7 +120,7 @@ public class JPanelChessBoard extends JPanel {
Math.round(cellHeight)
);
}
if(isHighlight || isSelect) {
if(isHighlight || isSelect || isCheck) {
g.setColor(new Color(115, 149, 82));
}