aoc2024/day-11/internal/two/result.go

30 lines
382 B
Go
Raw Permalink Normal View History

2024-12-11 19:26:56 +00:00
package two
import "fmt"
const (
flip = iota
split
multiply
)
type result struct {
kind int
left int
right int
}
func (r result) String() string {
var kindStr string
switch r.kind {
case flip:
kindStr = "flip"
case split:
kindStr = "split"
case multiply:
kindStr = "multiply"
}
return fmt.Sprintf("kind: %s left: %d right: %d", kindStr, r.left, r.right)
}