📝 change codes in test files.

This commit is contained in:
ValKmjolnir 2022-07-14 19:52:27 +08:00
parent d1a7d32e7b
commit 29084143d6
4 changed files with 11 additions and 14 deletions

View File

@ -28,6 +28,8 @@ var bfs=func(begin,end){
que.push(begin); que.push(begin);
map[begin[0]][begin[1]]=2; map[begin[0]][begin[1]]=2;
map[end[0]][end[1]]=0; map[end[0]][end[1]]=0;
if(map[1][0]==1 and map[0][1]==1)
map[1][0]=0;
while(!que.empty()){ while(!que.empty()){
var vertex=que.front(); var vertex=que.front();
que.pop(); que.pop();

View File

@ -21,11 +21,8 @@ var myers=func(src,dst,show_table=0){
if(show_table){ if(show_table){
var curve=[ var curve=[
["+---", ["+---","| "],
"| "], ["+---","| \\ "]
[
"+---",
"| \\ "]
]; ];
var s=""; var s="";
forindex(var y;dst){ forindex(var y;dst){
@ -41,9 +38,7 @@ var myers=func(src,dst,show_table=0){
print(s~"+\n"); print(s~"+\n");
} }
var total=[]; var (total,path,vec)=([],[],[[0,0,-1]]);
var path=[];
var vec=[[0,0,-1]];
visited[0]=1; visited[0]=1;
while(size(vec)){ while(size(vec)){
append(total,vec); append(total,vec);