Skip to content

Commit 81facdd

Browse files
committed
Working part one!
Oops, needed different arrays for my packet queues :facesmack:
1 parent 00b86d2 commit 81facdd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

2019/23/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Answers
22

3-
| Part 1 | Part 2 |
4-
|--------|---------|
5-
| ` ` | ` ` |
3+
| Part 1 | Part 2 |
4+
|----------|---------|
5+
| `22659` | ` ` |
66

77
## --- Day 23: Category Six ---
88

2019/23/network.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const { Computer } = require('./intcode-computer-optimized');
33
class Network {
44
constructor(program, nics_count = 50) {
55
this.original_program = [...program];
6-
this.packet_queue = Array(nics_count).fill([]);
6+
this.packet_queue = Array(nics_count)
7+
.fill()
8+
.map((_) => []);
79

810
this.nics = Array(nics_count)
911
.fill()
@@ -53,7 +55,6 @@ class Network {
5355
}
5456
}
5557
}
56-
5758
}
5859
}
5960

0 commit comments

Comments
 (0)