diff --git a/src/App.vue b/src/App.vue index 35ccb3b0de1ec412d6ab453c3866333179c8d5c8..748897991e64c95ae91aa9536853f5588a821263 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import { is_empty, checkWin, is_black, is_white, robotPlay } from "./utils" import RandomTree from "./components/RandomTree.vue"; // import { robotPlay } from './utils/api' // 配置 -const size = ref(20) +const size = ref(30) const win_size = ref(5) // 棋盘 const lattices = ref([]) @@ -53,6 +53,7 @@ function setPiece([y, x], type) { lattices.value[y][x] = type } async function playChess(item, row, col) { + console.time('playChess') if (isWin.length || item !== is_empty) return // 玩家下棋 @@ -70,6 +71,7 @@ async function playChess(item, row, col) { if (testRobo) { isWin = testRobo } + console.timeEnd('playChess') } diff --git a/src/components/RandomTree.vue b/src/components/RandomTree.vue index 637a00a8de8a2531ec0031912156ebf42e52f027..da633e6d71db8dd1cd5a547fa67340cc260d59bb 100644 --- a/src/components/RandomTree.vue +++ b/src/components/RandomTree.vue @@ -1,5 +1,5 @@ \ No newline at end of file