réparation
This commit is contained in:
parent
f66e6c7860
commit
92ab88893e
|
|
@ -240,12 +240,12 @@ public class Board {
|
||||||
|
|
||||||
public boolean isCheck(int x, int y) {
|
public boolean isCheck(int x, int y) {
|
||||||
boolean out = false;
|
boolean out = false;
|
||||||
if (board.get(x).get(y) != null) {
|
if (board.get(y).get(x) != null) {
|
||||||
if (board.get(y).get(x).getType() == PieceType.King && board.get(y).get(x).isWhite == turnColor){
|
if (board.get(y).get(x).getType() == PieceType.King && board.get(y).get(x).isWhite == turnColor){
|
||||||
if (kingCheck.isKingInCheck(board,turnColor)) {
|
if (kingCheck.isKingInCheck(board,turnColor)) {
|
||||||
out = true;
|
out = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue