Day 9: Rope Bridge [AOC2022 Python]

Veröffentlicht am: 09 Dezember 2022
auf dem Kanal: 0xdf
394
12

Today's challenge involves moving a knot around, and having another knot drag behind it. The challenge is to track all the spaces the tail goes. In part two, there are 10 knots, each dragging behind the previous one, complicating the movement.

Code 2022 AOC: https://gitlab.com/0xdf/aoc2022
Challenge Link: https://adventofcode.com/2022/day/9

☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf

#adventofcode #python

[00:00] Introduction
[00:11] Part 1 description
[01:58] Reviewing puzzle input
[02:20] Setting up loop over input and variables to track positions
[02:58] Moving head
[05:32] Moving tail
[08:10] Tracking visited spots, solving part 1
[09:09] Part 2 desription, strategy
[10:32] Changing part 1 solution to a list of two knots
[14:26] Troubleshooting errors in code
[17:25] Me trying to decide what to do next
[18:08] Going to move working code into a function
[19:28] Getting solution for 2 and 10 knots with function
[20:15] Summary


Auf dieser Seite können Sie das Online-Video Day 9: Rope Bridge [AOC2022 Python] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer 0xdf 09 Dezember 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 394 Mal angesehen und es wurde von 12 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!