day17: Day 17: Trick Shot

Description Usage Arguments Source

Description

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

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

Source

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


soniamitchell/adventofcode documentation built on Jan. 8, 2022, 9:33 a.m.