提交 d7c1339e 编写于 作者: U u014301111

Wed Jul 26 21:57:00 CST 2023 inscode

上级 3613db00
...@@ -20,7 +20,7 @@ export async function robotPlay(board, player, win_size) { ...@@ -20,7 +20,7 @@ export async function robotPlay(board, player, win_size) {
} }
], ],
apikey: apiKey apikey: apiKey
} };
return await fetch(apiUrl, { return await fetch(apiUrl, {
method: 'POST', method: 'POST',
......
...@@ -245,7 +245,9 @@ function getDirectionScore(pan_info, row, col, [y, x], win_size, player) { ...@@ -245,7 +245,9 @@ function getDirectionScore(pan_info, row, col, [y, x], win_size, player) {
const SIZE = r_piece_num + l_piece_num const SIZE = r_piece_num + l_piece_num
// 没有棋子 // 没有棋子
if (SIZE == 0) return 0 if (SIZE == 0) return 0
// 两边有障碍物且小于 win_size // 空间不够连成直线的
if ((r_obstacle_num + l_obstacle_num + 1) < win_size) return 0
if (r_empty_num == 0 && l_empty_num == 0 && (SIZE + 1) < win_size) return 0 if (r_empty_num == 0 && l_empty_num == 0 && (SIZE + 1) < win_size) return 0
// 两边都没障碍物 // 两边都没障碍物
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册