Actualiser OOP_2B1_Project/src/windowInterface/JPanelChessBoard.java
This commit is contained in:
parent
ac44075db4
commit
1c8f5ff889
|
|
@ -112,7 +112,7 @@ public class JPanelChessBoard extends JPanel {
|
||||||
if(isHighlight) {
|
if(isHighlight) {
|
||||||
g.setColor(Color.yellow);
|
g.setColor(Color.yellow);
|
||||||
}
|
}
|
||||||
if((x+y)%2==1 || isSelect || isHighlight) {
|
if((x+y)%2==1 || isSelect || isHighlight || isCheck) {
|
||||||
g.fillRect(
|
g.fillRect(
|
||||||
Math.round(x*cellWidth),
|
Math.round(x*cellWidth),
|
||||||
Math.round(y*cellHeight),
|
Math.round(y*cellHeight),
|
||||||
|
|
@ -120,7 +120,7 @@ public class JPanelChessBoard extends JPanel {
|
||||||
Math.round(cellHeight)
|
Math.round(cellHeight)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if(isHighlight || isSelect) {
|
if(isHighlight || isSelect || isCheck) {
|
||||||
g.setColor(new Color(115, 149, 82));
|
g.setColor(new Color(115, 149, 82));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue