Skip to content

Commit 28c830e

Browse files
committed
Revert "Fix capture counting when analyzing a finished game"
This broke end of game scoring This reverts commit a7ecf71.
1 parent a7ecf71 commit 28c830e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/engine/GobanEngine.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -1445,16 +1445,14 @@ export class GobanEngine extends BoardState {
14451445
ret.white.prisoners = this.white_prisoners;
14461446
ret.black.prisoners = this.black_prisoners;
14471447

1448-
if (this._cur_move === this.last_official_move) {
1449-
for (let y = 0; y < this.height; ++y) {
1450-
for (let x = 0; x < this.width; ++x) {
1451-
if (this.removal[y][x]) {
1452-
if (this.board[y][x] === JGOFNumericPlayerColor.BLACK) {
1453-
ret.white.prisoners += 1;
1454-
}
1455-
if (this.board[y][x] === JGOFNumericPlayerColor.WHITE) {
1456-
ret.black.prisoners += 1;
1457-
}
1448+
for (let y = 0; y < this.height; ++y) {
1449+
for (let x = 0; x < this.width; ++x) {
1450+
if (this.removal[y][x]) {
1451+
if (this.board[y][x] === JGOFNumericPlayerColor.BLACK) {
1452+
ret.white.prisoners += 1;
1453+
}
1454+
if (this.board[y][x] === JGOFNumericPlayerColor.WHITE) {
1455+
ret.black.prisoners += 1;
14581456
}
14591457
}
14601458
}

0 commit comments

Comments
 (0)