- if (this.onBoard(i, j)) {
- if (this.board[i][j] == "")
- noSuicide = true; //clearly
- else if (this.getColor(i, j) == color) {
- // Free space for us = not a suicide
- if (!noSuicide) {
- let explored = ArrayFun.init(this.size.x, this.size.y, false);
- noSuicide = this.searchForEmptySpace([i, j], color, explored);
- }
- }
- else {
- // Free space for opponent = not a capture
- let explored = ArrayFun.init(this.size.x, this.size.y, false);
+ if (this.onBoard(i, j) && !inCaptures[i + "." + j]) {
+ if (this.getColor(i, j) == oppCol) {
+ // Free space for opponent => not a capture
+ let oppExplored = ArrayFun.init(this.size.x, this.size.y, false);