2022 Day 23 Complete

This commit is contained in:
2022-12-27 10:44:20 -06:00
parent 667c3a4dc9
commit cdc31b204b
17 changed files with 4631 additions and 1 deletions

View File

@@ -66,6 +66,13 @@ func (c *Coordinate) SE() Coordinate {
func (c *Coordinate) GetOrthNeighbors() []Coordinate {
return []Coordinate{c.North(), c.East(), c.South(), c.West()}
}
func (c *Coordinate) GetAllNeighbors() []Coordinate {
return []Coordinate{
c.North(), c.NE(),
c.East(), c.SE(),
c.South(), c.SW(),
c.West(), c.NW()}
}
func (c *Coordinate) GetNorthCoord() *Coordinate {
return &Coordinate{