Skip to content

Commit f840bd0

Browse files
committed
update
1 parent 8776491 commit f840bd0

File tree

20 files changed

+590
-176
lines changed

20 files changed

+590
-176
lines changed

2015/day25/day25.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
fn read_data() -> (i32, i32) {
2323
let mut data = aoc::load_input_data(25);
2424

25-
data.retain(|c| c.is_digit(10) || c.is_whitespace());
25+
data.retain(|c| c.is_ascii_digit() || c.is_whitespace());
2626

2727
let data: Vec<_> = data.trim().split_ascii_whitespace().collect();
2828

2018/day13/day13.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl Puzzle {
123123
match nc.d {
124124
Direction::West => {
125125
nc.x -= 1;
126-
match self.grid.cell(nc.x, nc.y) {
126+
match self.grid[(nc.x, nc.y)] {
127127
'-' => (),
128128
'/' => nc.d = Direction::South,
129129
'\\' => nc.d = Direction::North,
@@ -142,7 +142,7 @@ impl Puzzle {
142142

143143
Direction::East => {
144144
nc.x += 1;
145-
match self.grid.cell(nc.x, nc.y) {
145+
match self.grid[(nc.x, nc.y)] {
146146
'-' => (),
147147
'/' => nc.d = Direction::North,
148148
'\\' => nc.d = Direction::South,
@@ -161,7 +161,7 @@ impl Puzzle {
161161

162162
Direction::North => {
163163
nc.y -= 1;
164-
match self.grid.cell(nc.x, nc.y) {
164+
match self.grid[(nc.x, nc.y)] {
165165
'|' => (),
166166
'/' => nc.d = Direction::East,
167167
'\\' => nc.d = Direction::West,
@@ -180,7 +180,7 @@ impl Puzzle {
180180

181181
Direction::South => {
182182
nc.y += 1;
183-
match self.grid.cell(nc.x, nc.y) {
183+
match self.grid[(nc.x, nc.y)] {
184184
'|' => (),
185185
'/' => nc.d = Direction::West,
186186
'\\' => nc.d = Direction::East,

2019/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://adventofcode.com/2018
22

33
[workspace]
4-
members = ["day16", "day22"]
4+
members = ["day16", "day22", "day18"]
55

66
resolver = "2"

2019/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
![AoC2019](https://img.shields.io/badge/Advent_of_Code-2019-8A2BE2)
44
![Stars: 50](https://img.shields.io/badge/Stars-50⭐-blue)
5-
![Rust: 2](https://img.shields.io/badge/Rust-2-cyan?logo=Rust)
6-
![Python: 24](https://img.shields.io/badge/Python-24-cyan?logo=Python)
5+
![Rust: 3](https://img.shields.io/badge/Rust-3-cyan?logo=Rust)
6+
![Python: 23](https://img.shields.io/badge/Python-23-cyan?logo=Python)
77

88
## 2019 ([Calendar](https://adventofcode.com/2019)) ([Solutions](../2019/)) : 50⭐
99

@@ -26,7 +26,7 @@ Puzzle
2626
[Day 15: Oxygen System](https://adventofcode.com/2019/day/15) | ⭐⭐ | [Python](../2019/day15/day15.py)
2727
[Day 16: Flawed Frequency Transmission](https://adventofcode.com/2019/day/16) | ⭐⭐ | [Rust](../2019/day16/day16.rs) [Python](../2019/day16/day16.py)
2828
[Day 17: Set and Forget](https://adventofcode.com/2019/day/17) | ⭐⭐ | [Python](../2019/day17/day17.py)
29-
[Day 18: Many-Worlds Interpretation](https://adventofcode.com/2019/day/18) | ⭐⭐ | [Python](../2019/day18/day18.py)
29+
[Day 18: Many-Worlds Interpretation](https://adventofcode.com/2019/day/18) | ⭐⭐ | [Rust](../2019/day18/src/main.rs)
3030
[Day 19: Tractor Beam](https://adventofcode.com/2019/day/19) | ⭐⭐ | [Python](../2019/day19/day19.py)
3131
[Day 20: Donut Maze](https://adventofcode.com/2019/day/20) | ⭐⭐ | [Python](../2019/day20/day20.py)
3232
[Day 21: Springdroid Adventure](https://adventofcode.com/2019/day/21) | ⭐⭐ | [Python](../2019/day21/day21.py)

2019/day18/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "day18"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
aoc = { path = "../../aoc" }
8+
9+
[[bin]]
10+
name = "day18"
11+
# # path = "day18.rs"

2019/day18/day18.py

Lines changed: 0 additions & 137 deletions
This file was deleted.

2019/day18/sample_1.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#########
2+
#b.A.@.a#
3+
#########

2019/day18/sample_10.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#################
2+
#i.G..c...e..H.p#
3+
########.########
4+
#j.A..b...f..D.o#
5+
########@########
6+
#k.E..a...g..B.n#
7+
########.########
8+
#l.F..d...h..C.m#
9+
#################

2019/day18/sample_11.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
########################
2+
#@..............ac.GI.b#
3+
###d#e#f################
4+
###A#B#C################
5+
###g#h#i################
6+
########################

2019/day18/sample_4.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
########################
2+
#f.D.E.e.C.b.A.@.a.B.c.#
3+
######################.#
4+
#d.....................#
5+
########################

0 commit comments

Comments
 (0)