lib/karel/model/token_container.rb in karel-interpreter-0.1.0 vs lib/karel/model/token_container.rb in karel-interpreter-0.2.0

- old
+ new

@@ -17,12 +17,12 @@ @tokens[location] -= 1 end return self end - def put(location) + def put(location, value = 1) @tokens[location] ||= 0 - @tokens[location] += 1 + @tokens[location] += value return self end def as_json @tokens.keys.sort.map do |location|