Remove check requirement for checkmate.
This commit is contained in:
parent
8d8b5cd347
commit
391257e8d7
@ -311,7 +311,6 @@ GAME.Game = class {
|
|||||||
this.state.check += checking_pieces;
|
this.state.check += checking_pieces;
|
||||||
|
|
||||||
// Count moves available to next turn player to determine checkmate.
|
// Count moves available to next turn player to determine checkmate.
|
||||||
if(this.state.check != 0) {
|
|
||||||
let moves = 0;
|
let moves = 0;
|
||||||
|
|
||||||
// Search for valid board moves.
|
// Search for valid board moves.
|
||||||
@ -334,7 +333,8 @@ GAME.Game = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(moves == 0) { this.state.code = GAME.Const.State.Checkmate; }
|
if(moves == 0) {
|
||||||
|
this.state.code = GAME.Const.State.Checkmate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -835,6 +835,7 @@ GAME.Const = {
|
|||||||
Current: 0,
|
Current: 0,
|
||||||
Checkmate: 1,
|
Checkmate: 1,
|
||||||
Resign: 2,
|
Resign: 2,
|
||||||
|
Default: 3,
|
||||||
},
|
},
|
||||||
|
|
||||||
Direction: [
|
Direction: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user