📝 add notes in test files & use system("color") to use ANSI esc seq
This commit is contained in:
parent
518ce7fcb9
commit
0576459fbe
|
@ -139,6 +139,8 @@ var curve7=func(){
|
|||
p=p>=4?0:p;
|
||||
}
|
||||
}
|
||||
|
||||
# enable unicode
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
trans_ttf("just for test");
|
||||
|
|
|
@ -53,7 +53,8 @@ var bfs=func(begin,end){
|
|||
return;
|
||||
}
|
||||
|
||||
# enable ANSI escape sequence
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
system("color");
|
||||
print("\ec");
|
||||
bfs([0,0],[9,19]);
|
|
@ -30,6 +30,7 @@ var prt=func(s,path){
|
|||
}
|
||||
}
|
||||
|
||||
# enable unicode
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
println("\e[33m[",unix.getcwd(),"]\e[36m>\e[0m");
|
||||
|
|
|
@ -29,8 +29,9 @@ var prt=func()
|
|||
}
|
||||
|
||||
func(){
|
||||
# enable ANSI escape sequence
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
system("color");
|
||||
print("\ec");
|
||||
rand(time(0));
|
||||
map=new_map();
|
||||
|
|
|
@ -22,6 +22,7 @@ var code=[
|
|||
[1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
];
|
||||
|
||||
# enable unicode
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
var texture=[" ","██"];
|
||||
|
|
|
@ -183,6 +183,7 @@ var co=coroutine.create(func(){
|
|||
});
|
||||
|
||||
var main=func(){
|
||||
# enable unicode
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
print("\ec");
|
||||
|
|
|
@ -94,6 +94,7 @@ var map=func(){
|
|||
}
|
||||
}();
|
||||
|
||||
# enable unicode
|
||||
if(os.platform()=="windows")
|
||||
system("chcp 65001");
|
||||
map.new(80);
|
||||
|
|
Loading…
Reference in New Issue