Skip to contents

Move one step

Launch probe until target is hit or overshot

Test which velocities might hit the target

Test which velocities might hit the target

Usage

read_day17(path)

simulate_launch(xrange, yrange)

move(status)

launch(df, trial, xrange, yrange)

find_possibilities(xrange, yrange)

simulate_launch2(velocities, xrange, yrange)

possible_x(range, min_v, max_v)

possible_y(range, min_v, max_v)

Source

<https://adventofcode.com/2021/day/17>

Arguments

path

file path

xrange

xrange

yrange

yrange

status

last step

velocities

velocities

range

range of target

min_v

minimum velocity to try

max_v

maximum velocity to try