diff --git a/src/utils/index.js b/src/utils/index.js index bcbd6e51dfc4ef183d2c78a2663c5b3979ca982b..fe33e58a4436c5b72c34b77aef1d92b2379208ac 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -177,15 +177,11 @@ function getScore(board, row, col, win_size) { let _col = col + x while (true) { - if (inRange(_row, ROW) && inRange(_col, COL) && board[_row][_col]) { + if (inRange(_row, ROW) && inRange(_col, COL) && board[_row][_col] === is_white) { res += 1 _row += y _col += x - } else { - if (_row >= 0 && _col >= 0) { - - } } } }