solution

package
v0.0.0-...-2562e00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSolutionOne

func ComputeSolutionOne(data []byte) string

func ComputeSolutionTwo

func ComputeSolutionTwo(data []byte) int64

func PrintProgram

func PrintProgram(prg []int8) string

func PrintProgramCommaless

func PrintProgramCommaless(prg []int8) string

Types

type Computer

type Computer struct {
	RegisterA int64
	RegisterB int64
	RegisterC int64

	Ptr int

	Output []int64
}

func ParseInput

func ParseInput(data []byte) (*Computer, []int8)

func (*Computer) Adv

func (cmp *Computer) Adv(op int8)

func (*Computer) Bdv

func (cmp *Computer) Bdv(op int8)

func (*Computer) Bst

func (cmp *Computer) Bst(op int8)

func (*Computer) Bxc

func (cmp *Computer) Bxc(_ int8)

func (*Computer) Bxl

func (cmp *Computer) Bxl(op int8)

func (*Computer) Cdv

func (cmp *Computer) Cdv(op int8)

func (*Computer) CloneComputer

func (cmp *Computer) CloneComputer() Computer

func (*Computer) ComboOp

func (cmp *Computer) ComboOp(op int8) int64

func (*Computer) Jnz

func (cmp *Computer) Jnz(op int8)

func (*Computer) Out

func (cmp *Computer) Out(op int8)

func (*Computer) PrintOutput

func (cmp *Computer) PrintOutput() string

func (*Computer) PrintOutputCommaless

func (cmp *Computer) PrintOutputCommaless() string

func (*Computer) RunProgram

func (cmp *Computer) RunProgram(prg []int8) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL