diff --git a/2023/Day2/part2.js b/2023/Day2/part2.js index dd10d75..26d56d2 100644 --- a/2023/Day2/part2.js +++ b/2023/Day2/part2.js @@ -9,13 +9,6 @@ var maxes = { blue:14 }; -//var sum=0; -//for(var gameid=1;gameid<=games.length;++gameid) { -// var game = games[gameid-1]; -// var bad = game.some(sample=>sample.some(([count,color])=>count>maxes[color])); -// if(!bad) sum+=gameid; -//} - var allpower = games.reduce((acc,game)=>{ var base={red:0,blue:0,green:0}; game.forEach(sample=>sample.forEach(([count,color])=>base[color]=Math.max(base[color],count)));