Commit 85b78858 authored by zjz1994's avatar zjz1994

特效消除暂存

parent bd1f14de
......@@ -3917,7 +3917,7 @@ export default class MainScene extends Scene {
var addhor:boolean = false;
if(cannocol>col){
for(var i=0;i<Tool.colNum;i++){
for(var i=col;i<Tool.colNum;i++){
var eleidx = Tool.rcToIndex(row,i);
if (!this.lattices[eleidx] || !this.lattices[eleidx].element) continue;
var lat = this.lattices[eleidx];
......@@ -3938,6 +3938,38 @@ export default class MainScene extends Scene {
}
}
}
}else if(cannocol<col){
for(var i=col;i>=0;i--){
var eleidx = Tool.rcToIndex(row,i);
if (!this.lattices[eleidx] || !this.lattices[eleidx].element) continue;
var lat = this.lattices[eleidx];
var iscannoblock = Tool.judgeIscannoBlock(lat);
if(iscannoblock){
break;
}
if(cannorow==row){
if(cannocol==i){
addhor = true;
break;
}
}else{
var addhortemp = this.addCannoStatByNext(cannoid,eleidx);
if(addhortemp){
addhor = true;
break;
}
}
}
}else if(cannocol==col){
if(cannorow==row){
console.error("不可能出现这种情况--检查",row,col);
}else if(cannorow>row){
}else if(cannorow<row){
}
}
return addhor;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment