From 0f796c32ae85714f8ea0bdd6877efc5d04110a01 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Sat, 10 Dec 2022 23:22:00 +0100 Subject: [PATCH] day 9 --- 9/README.md | 10 + 9/index.php | 105 +++ 9/ropes.txt | 2000 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2115 insertions(+) create mode 100644 9/README.md create mode 100644 9/index.php create mode 100644 9/ropes.txt diff --git a/9/README.md b/9/README.md new file mode 100644 index 0000000..9aad0b8 --- /dev/null +++ b/9/README.md @@ -0,0 +1,10 @@ +# [Day 9](https://adventofcode.com/2022/day/9) +:gift::gift::gift::gift::gift::gift::gift::gift::gift: + +Today's language: **php** + +My very first php-program :v: +```shell +php -S localhost:8000 -t . +firefox http://localhost:8000 +``` diff --git a/9/index.php b/9/index.php new file mode 100644 index 0000000..881ae83 --- /dev/null +++ b/9/index.php @@ -0,0 +1,105 @@ +

DER BIMMLER

+ 1) { + $tailn += ($distance <=> 0); + } +} + +/* ---------- */ +/* ---H---1H- */ +/* -1----2--- */ +/* -2-------- */ +function move_tail(&$head, &$tail, $tailnr, $i) { + print(strval($i)."-".strval($tailnr)."Head: "); + print_pos($head); + print(": "); + print_pos($tail); + + $dx = $head[0] - $tail[0]; + $dy = $head[1] - $tail[1]; + if (abs($dx) > 2 || abs($dy) > 2) { + exit(1); + } + if (abs($dx) == 2) { // move both + if (abs($dy) >= 1) { + $tail[1] += ($dy <=> 0); + } + $tail[0] += ($dx <=> 0); + } + else if (abs($dy) == 2) { + if (abs($dx) >= 1) { + $tail[0] += ($dx <=> 0); + } + $tail[1] += ($dy <=> 0); + } + /* move_number_closer($head[0], $tail[0]); */ + /* move_number_closer($head[1], $tail[1]); */ + print("->"); + print_pos($tail); + print("
"); +} + +function print_pos($pos) { + print("[".strval($pos[0]).",".strval($pos[1])."]"); +} + +$display_lines = array(); +function display($head, $tail) { + ob_clean(); + $req_size_x = max($head[0], $tail[0]); + $req_size_y = max($head[1], $tail[1]); + for ($y = 0; $y < $req_size_y; $y++) { + $display_lines[$y] = str_repeat('.', $req_size_x); + } + $display_lines[$head[1]][$head[0]] = "H"; + $display_lines[$tail[1]][$tail[0]] = "T"; + for ($y = 0; $y < count($display_lines); $y++) { + print($display_lines[$y]."
"); + } +} + +$filename = "ropes.txt"; +/* $filename = "test2.txt"; */ +$ropefile = fopen($filename, "r"); +$input = fread($ropefile, filesize($filename)); +$head_movements = explode("\n", $input); +fclose($ropefile); + +$visited_positions = array("0_0" => 0); +$current_positions = array_fill(0, 10, [0, 0]); + +for ($i = 0; $i < count($head_movements); $i++) { + /* print($head_movements[$i]); */ + $direction = $head_movements[$i][0]; + $amount = (int) substr($head_movements[$i], 2); + + for ($a = 0; $a < $amount; $a++) { + // move head + switch ($direction) { + case "L": + $current_positions[0][0] -= 1; + break; + case "R": + $current_positions[0][0] += 1; + break; + case "U": + $current_positions[0][1] += 1; + break; + case "D": + $current_positions[0][1] -= 1; + break; + } + // move tails + for ($t = 1; $t < count($current_positions); $t++) { + move_tail($current_positions[$t-1], $current_positions[$t], $t, $i); + } + $last_tail = count($current_positions) - 1; + $visited_positions[strval($current_positions[$last_tail][0])."_".strval($current_positions[$last_tail][1])] += 1; + /* display($current_positions[0], $current_positions[$last_tail]); */ + } +} +print_r($visited_positions); +print("Total number of positions=".array_sum($visited_positions)); +print("Number of unique visited positions=".count($visited_positions)); diff --git a/9/ropes.txt b/9/ropes.txt new file mode 100644 index 0000000..949fccd --- /dev/null +++ b/9/ropes.txt @@ -0,0 +1,2000 @@ +L 2 +D 1 +L 2 +U 2 +R 1 +D 2 +U 1 +R 2 +U 2 +L 1 +D 2 +L 1 +D 2 +L 2 +U 2 +D 2 +L 2 +R 1 +U 1 +D 2 +U 1 +L 1 +U 2 +D 2 +L 2 +D 2 +L 2 +R 2 +D 2 +U 2 +R 2 +U 2 +R 2 +U 1 +R 2 +D 2 +R 2 +D 1 +U 1 +L 1 +U 2 +R 1 +D 2 +U 1 +L 2 +D 2 +U 2 +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10 +D 1 +R 11 +L 12 +U 6 +R 2 +L 4 +R 11 +U 15 +D 6 +L 15 +R 7 +U 16 +D 9 +L 12 +D 14 +L 5 +D 15 +L 17 +R 7 +U 17 +L 10 +D 7 +L 2 +D 1 +U 4 +D 17 +U 17 +D 9 +L 14 +D 16 +L 2 +D 8 +L 5 +D 8 +R 6 +L 15 +R 17 +D 14 +U 17 +L 17 +U 12 +R 10 +L 12 +U 16 +R 10 +D 5 +R 2 +U 11 +R 6 +L 2 +R 2 +D 17 +U 17 +D 12 +U 5 +L 14 +U 2 +R 2 +D 3 +U 4 +R 5 +U 17 +L 9 +U 4 +R 2 +L 5 +U 8 +L 2 +D 5 +R 14 +U 15 +R 14 +D 3 +U 16 +L 3 +D 6 +U 3 +L 2 +R 3 +L 1 +R 6 +L 14 +U 10 +L 13 +R 8 +U 3 +D 7 +U 9 +D 2 +L 14 +D 5 +R 7 +D 8 +L 18 +R 13 +U 14 +D 6 +R 10 +L 10 +U 2 +L 11 +R 12 +U 6 +R 16 +L 10 +U 7 +R 12 +L 15 +D 2 +U 16 +L 4 +D 2 +L 1 +R 8 +D 7 +L 11 +R 4 +D 13 +U 13 +R 1 +D 15 +L 12 +R 5 +D 10 +U 8 +R 14 +L 10 +U 9 +R 7 +U 13 +L 5 +U 9 +L 15 +R 4 +D 13 +R 12 +D 5 +R 18 +L 3 +D 13 +R 17 +D 9 +L 8 +D 3 +L 5 +D 8 +U 10 +D 8 +L 2 +U 10 +R 6 +D 13 +L 17 +R 17 +D 16 +R 14 +L 6 +U 17 +R 9 +D 11 +L 7 +U 16 +R 16 +L 1 +R 17 +D 9 +L 6 +D 16 +R 12 +L 7 +U 5 +D 14 +R 8 +U 12 +L 12 +R 8 +U 17 +L 13 +D 17 +L 15 +R 7 +U 11 +L 10 +R 8 +U 14 +R 6 +U 11 +D 17 +U 13 +L 12 +U 11 +L 16 +D 13 +U 11 +L 2 +R 11 +L 13 +U 12 +R 15 +U 17 +L 10 +U 17 +D 2 +R 1 +L 10 +R 10 +U 14 +L 12 +U 8 +R 4 +L 12 +U 13 +L 2 +R 9 +D 14 +U 17 +L 16 +D 9 +R 3 +L 17 +U 8 +R 16 +D 11 +L 1 +U 15 +L 19 +R 8 +D 11 +R 14 +D 19 +R 12 +U 3 +L 9 +U 2 +L 6 +D 6 +U 16 +D 4 +L 1 +D 10 +R 8 +U 17 +D 2 +R 6 +D 19 +U 6 +R 9 +U 17 +D 7 +L 15 +D 13 +L 17 +U 1 +R 17 +D 3 +L 15 +U 16 +D 13 +R 13 +D 14 +L 12 +D 4 +L 16 +U 15 +R 8 +U 19 +D 15 +L 5 +R 15 +L 19 +U 6 +D 6 +U 10 +L 1 +R 19 +L 1 +R 6 +L 1 +U 17 +R 10 +U 4 +D 5 +R 6 +U 3 +R 12 +U 13 +D 7 +R 15 +U 5 +R 2 +U 10 +L 13 +U 3 +D 5 +R 19 +U 9 +D 5 +L 3 +D 17 +L 16 +D 7 +L 16 +R 11 +D 3 +U 1 +R 2 +D 2 +L 4 +R 4 +U 17 +D 4 +L 10 +U 11 +D 13