mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 22:30:47 +00:00
21 lines
297 B
Go
21 lines
297 B
Go
|
package two
|
||
|
|
||
|
type coords struct {
|
||
|
x int
|
||
|
y int
|
||
|
}
|
||
|
|
||
|
func newCoords(x, y int) coords {
|
||
|
return coords{x, y}
|
||
|
}
|
||
|
|
||
|
type antenna struct {
|
||
|
coords
|
||
|
identifier rune
|
||
|
}
|
||
|
|
||
|
func newAntenna(x, y int, identifier rune) antenna {
|
||
|
coords := newCoords(x, y)
|
||
|
return antenna{coords: coords, identifier: identifier}
|
||
|
}
|