From dcdb0a435768cfbdec4148325fdee1eca4ee21fb Mon Sep 17 00:00:00 2001 From: 63db3122f0950a2aef64df95 <63db3122f0950a2aef64df95@devide> Date: Wed, 5 Jul 2023 10:11:00 +0000 Subject: [PATCH] Wed Jul 5 10:11:00 UTC 2023 inscode --- src/utils/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index bcbd6e5..fe33e58 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) { - - } } } } -- GitLab