aboutsummaryrefslogtreecommitdiff
path: root/pkg/pointer/pointer.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-09-21 00:27:57 +0200
committerJulien Dessaux2021-09-21 00:27:57 +0200
commit309dcb5a029d9b40c72fa8bc01a3009389b66e8e (patch)
tree21d3456847ec32c8219c3b7d935f6c3cec5d5058 /pkg/pointer/pointer.go
parentBegan implementing the Instruction Pointer (diff)
downloadgofunge98-309dcb5a029d9b40c72fa8bc01a3009389b66e8e.tar.gz
gofunge98-309dcb5a029d9b40c72fa8bc01a3009389b66e8e.tar.bz2
gofunge98-309dcb5a029d9b40c72fa8bc01a3009389b66e8e.zip
Continued implementing the Instruction Pointer
Diffstat (limited to 'pkg/pointer/pointer.go')
-rw-r--r--pkg/pointer/pointer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/pointer/pointer.go b/pkg/pointer/pointer.go
index 5b4b860..8f2a299 100644
--- a/pkg/pointer/pointer.go
+++ b/pkg/pointer/pointer.go
@@ -6,13 +6,16 @@ type Pointer struct {
x int
y int
delta *Delta
+ // The Storage offset
+ sox int
+ soy int
}
func NewPointer() *Pointer {
return &Pointer{delta: NewDelta(1, 0)}
}
-func (p Pointer) ForkPointer() *Pointer {
+func (p Pointer) Split() *Pointer {
return &p // p is already a copy
}