Fix to run on Windows
I forgot about line ending differences.
This commit is contained in:
@ -7,6 +7,7 @@ const lines = fs.readFileSync('inputs/04.txt').toString().split('\n');
|
|||||||
let phase = 0;
|
let phase = 0;
|
||||||
let row = 0;
|
let row = 0;
|
||||||
lines.forEach(line => {
|
lines.forEach(line => {
|
||||||
|
line = line.trimEnd("\r");
|
||||||
if (line.length == 0) {
|
if (line.length == 0) {
|
||||||
boards.push(Array());
|
boards.push(Array());
|
||||||
phase++;
|
phase++;
|
||||||
|
Reference in New Issue
Block a user