Commit 323f4dac authored by Aayush's avatar Aayush

updated parser for pd_diagram->ascii_art

parent 40142450
Pipeline #1669 failed with stage
in 0 seconds
"use strict"; "use strict";
function makeArray(h, w, val) { function makeArray(h, w, val) {
var arr = []; var arr = [];
...@@ -166,16 +165,19 @@ object_msg_index_info[connection_info[i].start].cell_start_x, object_msg_index_i ...@@ -166,16 +165,19 @@ object_msg_index_info[connection_info[i].start].cell_start_x, object_msg_index_i
} }
} }
var ascii_art=''; var ascii_art='';
var ascii_art_line='';
for(i=0;i<matrix.length;i++){ for(i=0;i<matrix.length;i++){
ascii_art_line='';
for(j=0;j<matrix[i].length;j++) { for(j=0;j<matrix[i].length;j++) {
if (matrix[i][j] == "*"){ if (matrix[i][j] == "*"){
ascii_art = ascii_art + " "; ascii_art_line = ascii_art_line + " ";
} }
else { else {
ascii_art = ascii_art + matrix[i][j]; ascii_art_line = ascii_art_line + matrix[i][j];
} }
} }
ascii_art = ascii_art + '\n'; ascii_art_line = ascii_art_line.trim();
ascii_art = ascii_art + ascii_art_line + '\n';
} }
return ascii_art; return ascii_art;
......
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