func Create(wg *sync.WaitGroup, inputBufSize int, outputBufSize int) *IntCode {
	newIC := new(IntCode)

	newIC.memory = make([]int, 0)
	newIC.programPos = 0
	newIC.relativeBase = 0

	if inputBufSize > 0 {
		newIC.inputChan = make(chan int, inputBufSize)
	} else {
		newIC.inputChan = make(chan int)
	}
	if outputBufSize > 0 {
		newIC.outputChan = make(chan int, outputBufSize)
	} else {
		newIC.outputChan = make(chan int)
	}
	newIC.signalChan = make(chan Signal, 1)
	newIC.errorChan = make(chan string, 1)
	newIC.wg = wg
	newIC.moribund = false

	return newIC
}
// Create creates a new intcode computer
Create creates a new intcode computer
// Create creates a new intcode computer
func Create(wg *sync.WaitGroup, inputBufSize int, outputBufSize int) *IntCode {
	newIC := new(IntCode)
	newIC.memory = make([]int, 0)
	newIC.programPos = 0
	newIC.relativeBase = 0
	if inputBufSize > 0 {
		newIC.inputChan = make(chan int, inputBufSize)
	} else {
		newIC.inputChan = make(chan int)
	}
	if outputBufSize > 0 {
		newIC.outputChan = make(chan int, outputBufSize)
	} else {
		newIC.outputChan = make(chan int)
	}
	newIC.signalChan = make(chan Signal, 1)
	newIC.errorChan = make(chan string, 1)
	newIC.wg = wg
	newIC.moribund = false
	return newIC
}
func Create ( wg * sync . WaitGroup , inputBufSize int , outputBufSize int ) * IntCode { newIC := new ( IntCode ) newIC . memory = make ( [ ] int , 0 ) newIC . programPos = 0 newIC . relativeBase = 0 if inputBufSize > 0 { newIC . inputChan = make ( chan int , inputBufSize ) } else { newIC . inputChan = make ( chan int ) } if outputBufSize > 0 { newIC . outputChan = make ( chan int , outputBufSize ) } else { newIC . outputChan = make ( chan int ) } newIC . signalChan = make ( chan Signal , 1 ) newIC . errorChan = make ( chan string , 1 ) newIC . wg = wg newIC . moribund = false return newIC }
Create creates a new intcode computer
Create creates a new intcode computer