absolutely proprietary

This commit is contained in:
Verena Jäger 2022-12-06 20:14:08 +01:00
parent d08c4691ac
commit b205529a11
2 changed files with 12 additions and 4 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -70,6 +70,7 @@ function parseArr() { //parsing is hard
}
parsedArr[i] = tmpLine;
}
console.log("parsedArr", parsedArr);
}
function move(a, s, d) {
@ -91,10 +92,17 @@ function getTopPos(s) {
function parseCmd() {
for(let i=10; i<linesArr.length; i++) {
let tmpLine = [];
for(let j=0; j<linesArr[i].length; j++) {
if(linesArr[i].charAt(j)=='m') cmdArr[i-10] = linesArr[i].substr(j+2,1);
if(linesArr[i].charAt(j)=='f') cmdArr[i-10] = linesArr[i].substr(j+2,1);
if(linesArr[i].charAt(j)=='t') cmdArr[i-10] = linesArr[i].substr(j+2,1);
if(linesArr[i].charAt(j)=='m') {
let tmp = 1;
if(linesArr[i][j+1]!=' ') tmp = 2
tmpLine[tmpLine.length] = linesArr[i].substr(j+5,tmp);
}
if(linesArr[i].charAt(j)=='f') tmpLine[tmpLine.length] = linesArr[i].substr(j+5,1);
if(linesArr[i].charAt(j)=='t') tmpLine[tmpLine.length] = linesArr[i].substr(j+3,1);
}
cmdArr[i-10] = tmpLine;
}
}
console.log("cmdArr", cmdArr);
}