Steamline objectPosition init

check for resetting on the same position with different class, which
should not happen
Ie it’s ok for an object to push another object up,
but not for an instruction to land on code
This commit is contained in:
Torsten Ruger
2018-05-23 21:34:49 +03:00
parent f5d1090c39
commit 8ca70a6835
6 changed files with 39 additions and 31 deletions

View File

@ -3,7 +3,7 @@ module Risc
class ObjectPosition
attr_reader :at , :object
def initialize( at , object)
def initialize( object, at)
@at = at
@object = object
raise "not int #{self}-#{at}" unless @at.is_a?(Integer)