intcode

package
v0.0.0-...-05b2ddf Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileMem

func FileMem(s string) ([]int64, error)

Types

type ChanIO

type ChanIO struct {
	// contains filtered or unexported fields
}

ChanIO

func NewChanIO

func NewChanIO(buffer int) *ChanIO

func (*ChanIO) Chan

func (c *ChanIO) Chan() chan int64

func (*ChanIO) Read

func (c *ChanIO) Read() int64

func (*ChanIO) Write

func (c *ChanIO) Write(i int64)

type In

type In interface {
	Read() int64
}

type Intcode

type Intcode struct {
	// contains filtered or unexported fields
}

Intcode

func New

func New(mem []int64, in In, out Out, id int64) *Intcode

func (*Intcode) Do

func (ic *Intcode) Do() bool

func (*Intcode) Err

func (ic *Intcode) Err() error

type NullIO

type NullIO struct{}

NullIO

func NewNullIO

func NewNullIO() *NullIO

func (*NullIO) Read

func (r *NullIO) Read() int64

func (*NullIO) Write

func (r *NullIO) Write(i int64)

type Out

type Out interface {
	Write(int64)
}

Jump to

Keyboard shortcuts

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