2023 Day 13 Complete!

This commit is contained in:
2023-12-13 09:21:48 -06:00
parent ea9a19d034
commit ed635d9088
6 changed files with 1794 additions and 1 deletions

View File

@@ -303,6 +303,20 @@ func (m CoordByteMap) Map(l func(c Coordinate, in byte) byte) CoordByteMap {
}
return i
}
func (m CoordByteMap) RowAsString(y int) string {
var res string
for x := m.TLX; x <= m.BRX; x++ {
res = fmt.Sprintf("%s%s", res, string(m.Get(Coordinate{X: x, Y: y})))
}
return res
}
func (m CoordByteMap) ColAsString(x int) string {
var res string
for y := m.TLY; y <= m.BRY; y++ {
res = fmt.Sprintf("%s%s", res, string(m.Get(Coordinate{X: x, Y: y})))
}
return res
}
func (m CoordByteMap) String() string {
var ret string