diff --git a/day_17/part_1.php b/day_17/part_1.php index 2afc2b9..d081e98 100644 --- a/day_17/part_1.php +++ b/day_17/part_1.php @@ -9,7 +9,6 @@ $target = ['x_min' => $x_min, 'x_max' => $x_max, 'y_min' => $y_min, 'y_max' => $ function increment(&$x, &$y, &$x_velocity, &$y_velocity) { - $current_x = $x; $x += $x_velocity; $y += $y_velocity; if ($x_velocity > 0) $x_velocity -= 1; @@ -26,11 +25,6 @@ function check($x, $y, $target) $y <= $target['y_max']; } -$x = 0; -$y = 0; -$x_velocity = 6; -$y_velocity = 9; - $max = 0; for ($i = 1; $i < abs($target['x_min']); $i++) { $tmp_max = 0; diff --git a/day_17/part_2.php b/day_17/part_2.php index 8c7b5f4..756d06f 100644 --- a/day_17/part_2.php +++ b/day_17/part_2.php @@ -9,7 +9,6 @@ $target = ['x_min' => $x_min, 'x_max' => $x_max, 'y_min' => $y_min, 'y_max' => $ function increment(&$x, &$y, &$x_velocity, &$y_velocity) { - $current_x = $x; $x += $x_velocity; $y += $y_velocity; if ($x_velocity > 0) $x_velocity -= 1; @@ -26,11 +25,6 @@ function check($x, $y, $target) $y <= $target['y_max']; } -$x = 0; -$y = 0; -$x_velocity = 6; -$y_velocity = 9; - $possibilities = []; for ($i = 0; $i <= abs($target['x_max']); $i++) { for ($j = -abs($target['y_min']); $j <= abs($target['y_min']); $j++) {