提交 29e5eed7 编写于 作者: U u014301111

Sat Jul 29 02:44:00 CST 2023 inscode

上级 1e9f5771
......@@ -89,6 +89,11 @@ export function checkWin({ row, col, board, player, win_size }) {
y += dy;
}
// 出现五连珠,返回胜利
if (res.length >= win_size) {
return res;
}
x = col - dx;
y = row - dy;
while (inRange(x, COL) && inRange(y, ROW) && board[y][x] === player) {
......@@ -282,7 +287,7 @@ function getDirectionScore(pan_info, row, col, [y, x], win_size, player) {
}
}
// TODO:还有其他的判断,以后再做了
// TODO:其他判断
return 10 ** SIZE
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册