Fix to run on Windows

I forgot about line ending differences.
This commit is contained in:
2021-12-10 13:22:33 -06:00
parent f4a43710b8
commit 21b9ccbfee

View File

@ -7,6 +7,7 @@ const lines = fs.readFileSync('inputs/04.txt').toString().split('\n');
let phase = 0;
let row = 0;
lines.forEach(line => {
line = line.trimEnd("\r");
if (line.length == 0) {
boards.push(Array());
phase++;