Continued implementing the Instruction Pointer

This commit is contained in:
Julien Dessaux 2021-09-21 00:27:57 +02:00
parent 46170dd5b7
commit 309dcb5a02
4 changed files with 54 additions and 3 deletions

View file

@ -0,0 +1,13 @@
package pointer
func (p Pointer) GetStorageOffset() (x, y int) {
return p.sox, p.soy
}
func (p *Pointer) CalculateNewStorageOffset() {
p.sox, p.soy = p.x+p.delta.x, p.y+p.delta.y
}
func (p *Pointer) SetStorageOffset(x, y int) {
p.sox, p.soy = x, y
}