package
Version:
v0.0.0-...-e61498d
Opens a new window with list of versions in this module.
Published: Feb 4, 2024
License: Unlicense
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Abs returns the absolute value of an int.
func PrintState(tailLocation []Point)
PrintState prints the state of the grid.
Exercise for Advent of Code 2022 day 9
One returns the answer to the first part of the exercise.
answer: 6266
Two returns the answer to the second part of the exercise.
answer: 2369
type Point struct {
X, Y int
}
Point is an x/y tuple of ints.
CalculateMovement returns the movement of tail to follow the head. No movement is returned
if the tail is within 1 of the head.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.