From 3722f044ff3a6372c8418a30e02faca052f30dee Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Wed, 4 Dec 2019 10:42:49 -0600 Subject: [PATCH] Intcode Processor Work --- 2019/day02/main.go | 2 +- 2019/intcode-processor/go.mod | 2 +- 2019/intcode-processor/processor.go | 4 ++-- go.sum | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/2019/day02/main.go b/2019/day02/main.go index 6ac485a..205abee 100644 --- a/2019/day02/main.go +++ b/2019/day02/main.go @@ -1,9 +1,9 @@ package main import ( - "../intcode-processor" "bufio" "fmt" + "git.bullercodeworks.com/brian/adventofcode/intcode-processor" "log" "os" "strconv" diff --git a/2019/intcode-processor/go.mod b/2019/intcode-processor/go.mod index 91a91ea..3eb0d6c 100644 --- a/2019/intcode-processor/go.mod +++ b/2019/intcode-processor/go.mod @@ -1,3 +1,3 @@ -module intcode +module git.bullercodeworks.com/brian/adventofcode/intcode-processor go 1.13 diff --git a/2019/intcode-processor/processor.go b/2019/intcode-processor/processor.go index b9bd395..3f5084a 100644 --- a/2019/intcode-processor/processor.go +++ b/2019/intcode-processor/processor.go @@ -14,6 +14,6 @@ func NewProgram(prog []int) *Program { return p } -func (p *Program) PrintCode() { - fmt.Println(code) +func (p *Program) CodeString() string { + return fmt.Sprintf("%v", p.code) } diff --git a/go.sum b/go.sum index dfbff24..4ff593e 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,7 @@ bitbucket.org/thezeez/advent-of-code-2017 v0.0.0-20171225063809-1918042ef639 h1: bitbucket.org/thezeez/advent-of-code-2017 v0.0.0-20171225063809-1918042ef639/go.mod h1:0hCXmcMGkJQ6c4PhTVJLrbCvsxRpLoq84HQE8u8fFeY= bitbucket.org/thezeez/advent-of-code-2018 v0.0.0-20181225065213-533e12eb8451 h1:IFdtuKSjoogiNOcVqsANmYqy3jR2+AYdKolN6fDO2rg= bitbucket.org/thezeez/advent-of-code-2018 v0.0.0-20181225065213-533e12eb8451/go.mod h1:EmAD0MqW6nbmxrTlT7Lvzjv22xm5tcKgu6k0sBIMf6Y= +git.bullercodeworks.com/brian/adventofcode v0.0.0-20191204150234-ed78ac855a6d h1:sVMHqDXdjDdIFlL5jfm5U9swH+lb/B/ZtzM9+XqEzEs= github.com/alecthomas/gometalinter v2.0.11+incompatible h1:toROE7pXPU/pUB4lh6ICqUKwpDtmkRCyJIr1nYqmKp0= github.com/alecthomas/gometalinter v2.0.11+incompatible/go.mod h1:qfIpQGGz3d+NmgyPBqv+LSh50emm1pt72EtcX2vKYQk= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=