This commit is contained in:
Torsten Ruger
2018-03-26 19:17:30 +03:00
parent 46a5eefbd4
commit e61ef93943
4 changed files with 23 additions and 31 deletions

View File

@ -12,14 +12,15 @@ module Parfait
def initialize(total_size)
super()
if total_size > self.data_length
@next = BinaryCode.new(total_size - data_length) #one for the jump
@next = BinaryCode.new(total_size - data_length)
end
#puts "Init with #{total_size} for #{object_id}"
puts "Init with #{total_size} for #{object_id}"
(1..(data_length+1)).each{ |index| set_word(index , 0) }
end
def to_s
"BinaryCode #{}"
end
#16 - 2 -1 , two instance varaibles and one for the jump
def data_length
13
end