Auto Commit

上级 31184f2e
...@@ -32,8 +32,12 @@ function confirm() { ...@@ -32,8 +32,12 @@ function confirm() {
function back() { function back() {
if (records.value.length < 2) return; if (records.value.length < 2) return;
for (let i = 0; i < 2; i++) { for (let i = 0; i < 2; i++) {
const { location: [y, x] } = records.value.pop() const { location: [y, x], type } = records.value.pop()
lattices.value[y][x] = is_empty lattices.value[y][x] = is_empty
// 如果是玩家赢了,只需要退回一步就行
if(type === is_black){
break;
}
} }
isWin = [] isWin = []
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册