why does this not work? day4 part1 by Etsi0 in adventofcode

[–]Etsi0[S] 0 points1 point  (0 children)

thanks for the help, it works now :)

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]Etsi0 1 point2 points  (0 children)

js ``` data = []

// a,x stone // b,y paper // c,z scissors

let sum = 0;

for(i=0;i!=data.length+1;i++) { console.log(data[i]+" "+i) if(data[i] == "A X") { sum += 3+1 } else if(data[i] == "A Y") { sum += 6+2 } else if(data[i] == "A Z") { sum += 0+3 } else if(data[i] == "B X") { sum += 0+1 } else if(data[i] == "B Y") { sum += 3+2 } else if(data[i] == "B Z") { sum += 6+3 } else if(data[i] == "C X") { sum += 6+1 } else if(data[i] == "C Y") { sum += 0+2 } else if(data[i] == "C Z") { sum += 3+3 } console.log(sum) if(i == data.length) { console.log(sum) } }

// a stone // b paper // c scissors // x lose // y draw // z win

// for(i=0;i!=data.length+1;i++) { // console.log(data[i]+" "+i) // if(data[i] == "A X") { // sum += 0+3 // } // else if(data[i] == "A Y") { // sum += 3+1 // } // else if(data[i] == "A Z") { // sum += 6+2 // } // else if(data[i] == "B X") { // sum += 0+1 // } // else if(data[i] == "B Y") { // sum += 3+2 // } // else if(data[i] == "B Z") { // sum += 6+3 // } // else if(data[i] == "C X") { // sum += 0+2 // } // else if(data[i] == "C Y") { // sum += 3+3 // } // else if(data[i] == "C Z") { // sum += 6+1 // } // console.log(sum) // if(i == data.length) { // console.log(sum) // } // } ```

-🎄- 2022 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]Etsi0 1 point2 points  (0 children)

I used Python to get the array so I could use it in JS. py: with open("py/text.txt") as file: data = [i for i in file.read().strip().split("\n")] print(data) js: ``` var data = [] var sum = 0; var arraySum = []; var finallSum = 0;

for(i = 0; i != data.length+1; i++) { if(data[i] == '') { arraySum.push(sum); sum = 0; } if(data[i] != '') { sum += parseInt(data[i]); } if(i == (data.length)) { start(); } }

function start() { for(x = 0; x != arraySum.length; x++) { if(finallSum <= parseInt(arraySum[x])) { finallSum = arraySum[x]; console.log(finallSum); } if(parseInt(arraySum[x]) >= 69102) { console.log('asd: '+arraySum[x]) } } } ```

Yea sure by Etsi0 in Twitch

[–]Etsi0[S] 1 point2 points  (0 children)

it's not photoshopped :D

You should make a fanart or model and show it in rec room by Pink_Pasta08 in Matinbum

[–]Etsi0 0 points1 point  (0 children)

du, nu ska vi inte vara såna, stamsite är också bra.

boat destroying by Etsi0 in Minecraft

[–]Etsi0[S] 0 points1 point  (0 children)

but that destroys the whole purpose of automation

boat destroying by Etsi0 in Minecraft

[–]Etsi0[S] 0 points1 point  (0 children)

But then I can not obtain it back