mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 21:08:45 +08:00
📝 change codes in test files.
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
+3
-8
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user